Tuesday 5 June 2012

OpenGL: Terrain Project First Finale

It has been a while since I last posted about my progress, however I am glad to say that things have improved by quite a bit since then. A lot of time has been spent trying to get my head around how to dynamically generate new terrain segments, thankfully I did finally manage to come up with a solution that I am fairly happy with. This is a bit hard to show off in screenshots, but what this essentially means is that you can now keep travelling and the program will keep generating new terrain to explore. Originally I had hoped this could happen indefinetly, but due to the way I finally ended up implementing this, there is a limit to how much terrain the program will generate. The world is still vast though, and you will probably have gotten bored long before reaching this point.

Implementing a dynamically and procedurally generated terrain system was the main goal of this project, so I am very happy to have been able to reach this point.
After implementing the dynamic terrain generation, the final thing I did was to improve the terrain generation. Previously, the terrain looked pretty repetitive and still fairly unnatural. After tweaking the numbers, I have managed to go from this:

To this:

There is now a lot more variation in the height of hills and valleys in the terrain, as before there was a lot of pretty similarly sized hills. The current implementation could be improved further with more number tweaking, however I am happy enough with how it is at the moment.

I am now going to open up this project a bit, so I have put up the code on google code, as well as binaries if you would just like to try running it. There are still a few issues that remain, such as the fact that it takes a few seconds before the terrain is first generated around the camera, and the fact that I suspect there is a memory leak somewhere. For the most part though, I am pretty happy with the code. I have spent a fair amount of time trying to do things properly and have documented as much as possible, so I can come back to this in the future and be able to work out what the heck I was doing.

I am now planning to put this project to bed for now and take a look at some other things. There are still several issues that I will hopefully get around to and may end up developing this further in the future, but I think for now it is time for other projects. What this will be is currently a mystery, but whatever it will end up being I will most likely be posting about it on this blog.

No comments:

Post a Comment