top of page

Portfolio

PROJECT

Video Game: Procedural Explorers

TOOLS

Plastic SCM, Unity, Obisdian, C#, Tilemaps, Shader graph, Particles.

DESCRIPTION

This is an very early showcase of my procedurally generated world system created with 2D sprites, tilemaps, shaders and particles all done by myself. 

Developer

03/06/2024 - indev

GENERAL OVERVIEW

  • Grid style movement and collision system for the player.

  • Sprite width/height detection for larger world objects to prevent spawn overlapping.

  • Use of complex algorithms to generate clusters of grass, quicksand, and more.

  • Shaders for fog, foilage in wind, sway of plants, water and more.

  • Day & night system with 2D sprite shadow skewing and mirror flip skewing overtime.

  • Worm particles with trails, with rapid toggling optimisation, so when a user is zoomed too far out, the worms won't be rendered. 

  • High performance floor generation with custom made sprite tiles so its seamless. 

  • Ambience particles and tree leaves. 

  • Rain particles with animation for splash.

WORLD GENERATION PERFORMANCE

SHADERS / PARTICLES : FOILAGE, SWAY, WATER, FOG / AMBIENCE, WORMS, LEAVES

PLAYER GRID MOVEMENT

DAY & NIGHT SYSTEM

ANIMATED RAIN PARTICLES

ROLES & RESPONSIBILITIES

  • All art & technical art​

  • All programming

TECHNICAL & INTERDISCIPLINARY SKILLS

  • This projects demonstrates a lot of technical skills such as using c#, adhering to coding standards, the use of source control (Plastic SCM), game maths, shaders, particles, tilemaps, optimisation, testing, debugging, code design, and iterative development.​​

  • I also showcased a range of interdisciplinary skills: research skills to design the world map and sprites whilst retaining performance; problem-solving by retrieving and applying the information required to fix bugs; the use of agile practices by working within the framework and applying iterative and incremental development; version control using Plastic SCM; remote working by using common remote working tools; time management by logging information in Obsidian; documentation by creating a games design document in obsidian ; and project management by using LOF checks, Obsidian to manage the stages of work effectively.

CODE REVIEW & CHALLENGES

Below discusses screenshots of code and how I designed the systems to create Procedural Explorers.

PARTICLES - WORMS

PARTICLES OVERVIEW

The particles ​use a combination of noise for random movement, and trails to create the line behind them. These two things combined create an interesting and realisitic enough worms simulation. 

worms.png

RAPID TOGGLE CODE OVERVIEW

worms.png

The Optimise coroutine periodically checks the zoom level of the application and toggles optimization features on or off based on this zoom level. The goal is to optimize performance by activating or deactivating certain objects depending on how close the user is zoomed in or out.

"if (Time.time - lastToggleTime > debounceInterval)"
This line ensures that the optimization toggling does not happen too frequently. It checks if the time since the last toggle (lastToggleTime) is greater than a specified interval (debounceInterval).

MAIN CHALLENGES

CONFIGURING A PERFORMANT AND REALISTIC WORM SYSTEM

The worms in the map are quite small, so I created a rapid toggling switch system, that essentially turns off the worms when the camera is zoomed too far out to see them, but to prevent the user scrolling in and out repeatedly which would overload this system for no reason, a rapid toggling system is used to delay when they should trigger on or off. 

Another consideration on how I was going to create the worms was with sprites and use a noise map in code to randomise the movement, but I decided to use particles with trails and configure it until I got a realistic worm simulation system. 

The only reason these worms exist are for visual effect, so they didn't require a gameobject for interaction, so particles was the best option. 

SHADOWS

CODE OVERVIEW

The OnTimeOfDayChanged method is an event listener that gets called every in-game hour. It updates the shadow's color, rotation, and scale based on the time of day. This creates a dynamic shadow effect that changes throughout the day, providing a more immersive visual experience.

The OnTimeOfDayChanged method dynamically adjusts the shadow's color, rotation, and scale based on the in-game time of day. This creates a realistic effect where shadows change appearance as the day progresses, providing visual cues to the player about the time of day. The method uses linear interpolation (Mathf.Lerp) to smoothly transition between different states, ensuring a seamless visual experience. The system is designed to be simple, customizable, and efficient.

Shadow.png

FOILAGE SHADER

SHADER OVERVIEW

The first thing that is done is that the UV is divided and floored to create a pixellated effect, since the game is pixel art I wanted to keep a consistent style. 

Moving the UVs is done by multiplying the speed and time node together, which is then inputted into the noise (kind of like how Perlin/simplex etc works but a lot more stylised), so the pixels move around. 

These two nodes are then blended together to manipulate the sample texture, which is how the tree's foilage looks like it is swaying in the wind in a pixel art style.

Shadow_edited.jpg
bottom of page