Monday, June 6, 2011

Update on Terrain Generation

Hey guys, it's been a busy last few days. This weekend was fairly productive and even a little frustrating at times. However, after much digging on the internet and reading up on terrain generation techniques, I have decided (at least for now) to use a modified version of the Midpoint Displacement algorithm for my terrain generation.

So far, this seems to be working moderately well. The overall shape of the terrain (top layer, of course) is fairly randomized but not too chaotic. The issue I have yet to work out is my technique for putting the correct block (i.e. with the correct texture) with the correct sides, cutouts, corners, etc.

I have spent a fair amount of time tweaking my brute force if then else statements to handle the different cases, but am having difficulty when I get more than just a few cases to try. Anyway, here is a screen shot of my latest build in all it's glory.
Though I am having trouble at the moment, I am enlisting the help of the wonderful people on the Xna forums so I should except to have a better strategy for my blocks in the near future.

In the meantime, I will be working on either the player's inventory (which at this point would only include blocks he has 'mined') or fixing the map saving/loading which has no doubt suffered because of my new terrain generation procedures.

Check back often for updates!

No comments:

Post a Comment