Terrain testing

Planning and Development

I thought a good way to get back into development would be to re-familiarize myself with the height map system.  It turned out to be a good place to start because I wasn’t 100% on how it all worked but now I think I am.  Small changes in the red value on the maps make huge differences in the terrain height.  Changes to the green value are mid-range.  Changes to the blue value as pretty minuscule.  This was the intended design, but I may have had the blue and green values switched.  I’m not really sure, but in any case it is correct now.  Also, it turned out my game code works just fine with the newly created height maps.  So I can make something in GIMP, upload it, then run around on that terrain in the game world.

Since I’m clear on the terrain system, my next step is to improve my terrain editing tools.  I can use an image editor like GIMP, but it’s not practical.  The difference between [r,g,b] values of [128, 0, 0] and [129, 0, 0] (or 0x800000 and 0x810000 in hex) is virtually invisible to the human eye, but it’s a height difference of 256 meters in the game world, which is a pretty big deal.  I already have a mechanism to raise and lower individual terrain vertices, but I need to develop something more like a brush tool that can be resized and dragged across the terrain to raise or lower multiple points simultaneously.  This will be a little complicated to implement, but with that tool I’ll have a real terrain editing system and I can move into asset placement tools, which will be much more fun.

Leave a Reply

Your email address will not be published.