Posted April 15, 2024 by MAAD Studio
Hello, while developing Hex Chronicles: Athera, we are considering using Procedural Content Generation to let players generate more levels. So today I want to talk about some technical knowledge we have learned about Procedural Content Generation:
Wave function collapse - Wikipedia
A procedural generation algorithm inspired by quantum mechanics used for generating random yet coherent patterns and layouts. It generates tile-based games, puzzles, maps, text and texture. Each tile defines which other tiles can be its neighbours. These rules ensure the generated pattern or map is coherent and follows the desired aesthetics or logic.
Perlin noise is a popular algorithm for generating natural-looking terrains and landscapes. It creates smooth, organic patterns that resemble natural features like mountains, valleys, and rivers. Perlin noise is best to used as a basis for generating the overall layout of your game levels, then add additional elements and features on top to enhance gameplay.
Diamond-square algorithm - Wikipedia
The diamond-square algorithm is another popular choice for generating realistic terrain heightmaps. It iteratively subdivides a grid and assigns elevation values based on nearby points, resulting in smooth, natural-looking landscapes with varying elevations and features. You can use the diamond-square algorithm to create detailed heightmaps for your game levels, which can then be converted into playable terrain.
Cellular automaton - Wikipedia
Cellular automata algorithms, such as the famous Conway's Game of Life, are excellent for generating terrain with distinct regions and patterns. By defining rules for how cells evolve and interact with each other, you can create diverse landscapes with different biomes, obstacles, and environmental features. Cellular automata are highly customizable and allow for a great deal of control over the final map layout.