Monthly Archives: April 2017

Update 14: Minor Improvements

Nothing too major this update, I’ve been working on some other personal things the last month so I haven’t done anything major on the game.

  • Made it so an individual tile will highlight when hovered over with the mouse.
  • You can now make square box selections with the mouse by clicking and dragging.
  • Added a distance fog for when using the free floating camera
  • Replaced black sky color with blue.
  • Fixed a z-clipping issue where the ocean mesh intersected the land mesh.
  • Optimized terrain rendering for free floating camera. Camera used to sit in the middle of the terrain chunk, now any terrain behind the camera is not calculated.
  • Shaders now recompile when using free floating camera and implement a different type of z-buffer.
  • In debug mode I can now switch from game camera to free floating camera at click of a button.
  • Added more robust terrain tile painting tools
  • When a grass tile is sloped above a certain threshold it becomes a dirt tile.

Improvements made to free floating camera, decent enough draw distance.


Z-clipping issue fixed where the ocean meets the land


Drawing onto the terrain

Here is a low framerate fly over of the terrain using the free floating camera.


Update 13: Simple Rivers

For me, one of the most important parts of the world generation has to be the rivers. I feel like I rarely see genuine flowing rivers in games, especially not procedurally generated ones. Minecraft and NoMansSky have ‘rivers’ but they don’t really follow any logic, they don’t really flow, and have no clear end and start. This is because the world of minecraft is on an infinite plane and NoMansSky has infinite planets. The terrain has no hard limits, so it’s not possible to do an actual simulation of erosion or rainfall. For me, rivers created from noise generation just don’t cut it, even a very simple simulation of rainfall and erosion is much more interesting.

I always like to get something working as soon as possible. So I started with a dead simple rainfall model. I attach a ‘water level’ value to each tile, then to simulate rain I increment the ‘water level’ for each tile every step of the simulation. Higher points will get slightly more rain. Then, if the water level on an adjacent tile is lower, I move a fraction of water from the current tile to that adjacent tile. I also evaporate water on each tile by a constant amount each step.


Initial simple water simulation

Initial results are quite decent, the noise generation already has decent river like formations and valleys carved into it. So the water just flows into the valleys and looks quite natural.


After running the simulation for 500 steps

Simple beginnings, next step will be to add an erosion model and actually mesh the rivers. Right now, any tile that’s above a water threshold is blue, there is no depth to water, it’s just flat.