One of the main challenges with any kind of procedural generation is creating a result that doesn’t look and feel randomly generated. In the case of Sudoku, this means generating symmetrical puzzles. In the case of a game like Minecraft, this means making terrains and biomes that flow smoothly from one area to another. In the case of Gravity Runner (this title is definitely a work in progress), this means chains of obstacles and rewards that flow and aren’t randomly scattered. It also means not creating any dead ends that the user won’t have time to avoid.
Unfortunately, the research I’ve done into this area suggests that getting it right for this kind of environment is incredibly hard. The general guidance is to make many larger chunks by hand, and then chain them together randomly. Since I don’t want to be encoding all of these different chunks by hand, I’ll be making a quick Unity scene that will let me do it visually, and save the results to a file that I can read at runtime.
A screen during the game will be 10 cells high, and 25-30 units wide (this will be decided during testing), a chunk will be 10×100. The chunk editor will show a 10×25 grid, but will scroll to show all 100.