Back Into the Code – Terrain Trouble, Weather Systems, and Visual Tweaks

Procedural Generation

Since my last post about returning to game development after a long break, I’ve been back in the thick of things. I’ve spent most of my time working on procedural terrain generation.  More specifically, trying to connect different terrain types smoothly using TileMapLayer.set_cells_terrain_connect() in Godot 4.3.  Let’s just say it didn’t go as planned.

The idea was to have nice seamless borders between terrain types, but the reality turned out to be full of edge cases. Whenever three or more terrain types meet in close proximity, things break down, visually and logically. The transitions look bad, and worse, the system is painfully slow. Loading terrain in real time for a chunk-based world is completely impractical with this method. So for now, I’ve put that approach on hold and will be revisiting it with a fresh strategy later.

Ambiance and Environmental Systems

In the meantime, I’ve shifted focus to some gameplay ambiance and environmental systems. I started laying the groundwork for a weather system, building a basic state machine to manage weather types. To complement that, I added a CanvasModulate layer to simulate a day-night cycle and hooked it up to a simple UI from a great tutorial I found. The plan is to eventually make the weather and time systems work together so that, for instance, the sky darkens more dramatically when it starts to rain or storm.

Speaking of rain, I’ve added some rain particles and a fog effect as a first pass.  They work… kind of. The rain is kind of hard to see so I need to work on that. One issue I’m currently debugging is that the rain moves in the wrong direction when the player moves, likely because the particles are tied too closely to the player’s position. It causes them to shift far more drastically than they should, which breaks the illusion. I’ll need to rethink how I position or simulate the weather visuals relative to the player or camera.

Grass Tile Art

Lastly, I’ve also begun adding some basic grass tiles, moving beyond the basic biome colors I started with. The world definitely needs more visual identity, and building out a consistent tileset will help me get there.  I just started to work on some alternate grass tiles as well as the edge tiles.  I went with more of a noise based style and  I am assuming it is a work in progress at this point.  

What’s Next?

Up next, I’ll probably focus on tile art and continuing to develop the procedural generation system. I want to start shaping how the chunk generation works in practice, as well as improve the overall look of the world. I’d also like to begin populating the environment with trees and other natural elements to give the map more life and variation.

Thanks for reading. Feel free to follow along or reach out if you’ve dealt with similar terrain headaches in Godot. More soon.

Back Into the Code – Terrain Trouble, Weather Systems, and Visual Tweaks Read More »