2025-11-11 • game dev, world generation
Path-based world generation
I'm building a fast-paced platforming game where one player chases another through a procedurally generated world. I've settled on a few criteria for the world generation:
- No dead ends - players should be able to pick a direction and run without hitting impassable walls, except in specific circumstances (for example, power-ups might be housed in small cubby holes).
- Branches - the map should offer multiple routes to allow players to change directions as they please.
- Different biomes - different environments should feel distinct in their layout. For example, a caverns biome might feature long, winding pathways, while an office buildings biome would emphasize flat, structured paths across multiple levels.
With these requirements in mind I decided to opt for a "path-first" generation approach, which prioritizes creating navigation paths throughout the world first, and then build the rest of the world geometry around those paths. This contrasts with tile-based approaches like wave function collapse.
Also, given that the gameplay feel is heavily shaped by how the player moves throughout the world, having path generation be the first step means that I have more control over the pathing and hence the player movement, to help dial in the gameplay feel.