CSC3095-Stage 3 Project (C++ / OpenGL)
The aim of this project was to create an infinite scrolling terrain using procedural generation. I researched various uses and algorithms for procedural generation, created a system for infinite scrolling terrain using a couple of these algorithms, and compared them on performance and graphical detail.
As part of the research, I gained a far greater insight into procedural generation, including the different types and uses, as well as several algorithms. The software engineering element also taught me the importance of good project management, planning the project with plenty of room for problems to occur, and making sure that I kept to the plan, updating it where necessary.
To achieve infinite scrolling, I spilt the world into square chunks, organised in a scene graph. The renderer stored a 5x5 grid of these chunks around the player. When the player moved into a new chunk, rather than unloading and reloading in new chunks, chuncks were moved into a new position.
Two different procedural generation techniques were compared: Perlin Noise and Value Noise. I ran each of them at 1, 2, and 3 octaves (the more octaves used, the greater the detail but the slower the generation). I then compared the generation time and how detailed the output was. For the same number of octaves, Perlin Noise took longer but produced better results than Value Noise. However, after several octaves, Value Noise could be ran with more octaves quicker than Perlin Noise, producing more detailed terrain. Though, it's still generally considered that Perlin Noise produces more natural looking terrain, regardless of performance or level of detail.