P-152: Virtual World Concept Update 94: Fractal Terrain Generation
I am not quite ready to return to this project, but I think I have an idea as to what I’d like to try next.
I was generating the terrain before the level loaded, and storing the large number of points generated. I was then trying to create an optimal way of parsing and rendering these points.
A much smarter way would be to generate the terrain on-the-fly, using a fractal algorithm. I could then solve the problem of how to generate planet-sized terrains, since generating enough points to create an entire planet at once would be impossible.
Fractal terrain would also be fairly easy to optimise, since only the polygons that are going to be rendered would need to be generated. I may not need to use a quad tree at all.
From what I have read, using a fractal algorithm to generate terrain is not actually that difficult. It would not be entirely dissimilar to the work I have already done on P152. The hard part,or one of the hard parts, would be making the terrain reproducible. Ie, if a user returned to the same position again, the terrain should look the same. With purely dynamic fractal terrain, this would not occur, since the terrain information would not be stored.
However, by using a seed value, it is possible to generate the same set of points again. I would need to come up with some method of generating random terrain on the fly using only the seed values. This is essentially what the game No Man’s Sky does. According to wikipedia, No Man’s Sky’s planet terrain generation code is only 1,400 lines long! My current code is well over 10,000 lines, so obviously there is a simpler way to approach this problem.
No Mans Sky also contains many other interesting procedural technologies, such as superformula equations to general shapes, L-systems, and a vast, shared, universe to explore. The wikipedia article also mentions complex behaviour emerging from simple AI rules, this is similiar to the type of work I am doing with this project.
Fractal Terrain Generation, even without quad-tree’s, should be able to solve the problem of realistic planet sized terrains, even in a multiplayer environment.
