The Making of River Delta


Welcome! if you have never read any of the devlogs for my games before, these are discussion of my thoughts when making the game, as well as secrets of how the game works.

River delta is a game that was created for the University of Maryland Game Development Club's Fall 2024 Game Jam. The themes for this game were Duality and Flooding. My goal when creating this game was to avoid the issues many of my other games have where there is not nearly enough tutorial for the complexity of the systems involved. So river delta is supposed to be as simple as possible of a game to understand.  When playing river delta, there is no goal. The game is perfectly happy to play itself if you want, but you can actually pick flowers you don't want which causes new flowers to grow that inherit the genetics of the existing plants. 

While there is no end goal to the game, my challenge to players is always to get a bright green flower with 10 leaves.

- Fluids -

One of the main aspects of the game, inheriting directly from the theme, is the water.

Originally I was trying to design a much more complicated fluid simulation where there was actually soft-body physics where only particles on the very edge would interact. But after I only succeeded in making some very wacky glitches. So eventually I scrapped that system and switched  to a particle collision system, where water is modeled as a bunch of small particles that collide and slide off each other. To make up for the water not behaving perfectly like a fluid I created a meta-ball shader so that the disparate particles look like a coherent fluid. Writing the shader took like half of the development time since, I originally tried to do all the processing on the CPU but it caused the frame-rate to absolutely tank. Eventually I ended up using a render texture and a camera input to utilized unity's existing rendering capabilities and avoiding reinventing the wheel. This makes some artifacts on the texture, but its good enough.

- Shaders -

Every game I make I try to learn something new about game development. This time the main thing I was learning was how to write shader code. This was not nearly as easy as I was expecting as the shader coding language is very poorly documented. However, after following many different examples and pages, I was able to create 3 unique shaders: The fluid shader, the flower shader, and the dirt shader. The dirt shader takes in 3 textures for the dry, wet and moist dirt and then also has a value that represents the saturation of the dirt and fades between the textures. The fluid shader is really just a cut-out shader that takes in the texture from the render camera of the fluid particles with the meta-ball mesh and only returns the pixels that have a certain alpha value, it then also takes in the color from the sprite renderer to color the water. The flower shader is interesting since the original flower texture has perfectly white pixels wherever the color should be replaced. The shader takes particles and decides their luminance to isolate the white particles and replaces the color with whatever the color should be.

- Plants-

The plants are interesting because not only are they fully procedurally animated, they have several different genetic traits. Plants can have different colors (Which have genetic traits for hue, saturation and value), level of breath for flooding resistance, thirst for drought tolerance, different sizes, different grow speeds, the number of leaves, and how long the plants live for. When new plants grow, if there are 2 or more plants on the field then 2 plants will randomly be chosen to split their genetics with the new plant.

- Cheat Codes -

If you read this far into the devlog you deserve some cheat codes as a treating,

Pressing "j" and "k" will spawn a random good plant

pressing "z" and "x" will prevent plants from randomly dying

pressing "b" and "n" will prevent plants from dying at all, except for being pulled up.

- Conclusion -

River delta was a great success for a game. I was actually able to keep feature creep in check and made a simple game that is easy to explain and anyone is able to play. I hope to do a bit more complicated of a game next semester, but will try to keep with the lessons I learned from this game.

Thanks :D

-Tad