Level Generator
DoE I used an external plugin to generate semi-procedural levels at runtime. I enjoyed working with this, and we achieved a satisfactory result - but DoE II needed to be bigger. Some considerations:
Open World
The lead designer had specified a desire for open-ended objectives in a large level. So it needs to be able to generate large worlds (roughly 3km squared).
More Granular Randomness
DoE I had random layouts of pre-designed ‘rooms’. This was restrictive in the sense that the structures could not be natural or organic, as well as still leaning heavily on authored content for the rooms themselves.
In-house Solution
Relying on an external solution left us vulnerable to bugs and dependent on updates. By building the generator from the ground up, I would have total control of the system and documentation.
Outpost Gameplay
Inspired by games like ‘Helldivers 2’, or the ‘Far Cry’ franchise, the lead designer expressed a desire for authored outposts to blend into the landscape that would contain combat gameplay.
We had to make one concession in terms of the landscape tech. Unreal Engine 5.4 has very limited tools insofar as runtime terrain generation is concerned. For this system, I have used an external plugin that ‘voxelizes’ the terrain and allows me to sculpt from code.
Step-by-step Process
This is an example from the forest biome level.
1.
3.
Using a selection of noise algorithms, I generate a basic landscape with hills and valleys.
I spawn the largest outpost. This will contain the boss fight.
It is placed from a selection of candidate points scattered randomly around the level. It chooses the one with the greatest distance to its closes path point, so it doesn’t spawn too close to the main route.
2.
4.
Using a custom pathfinding algorithm, I draw the main roads through the map. These can be either a crossroad, T-junction or single path. I spawn the player at the edge of the map on one of these spline points.
I connect the POI to the closest main route.
5.
Using the scatter technique outlined in step 3a, I spawn 3 - 5 medium-sized outposts and connect them to their nearest paths. The level is beginning to take shape!
6.
I spawn 6 - 9 small POIs around the map. These will not be connected to the path network and will serve as rewards for the player for venturing off the beaten path, or hiding from patrols.
7.
Onto PCG now. I call cliffs to spawn on areas above certain steepness. This provides natural barriers, forcing the placer to more carefully consider their route through the level.
8.
Finally, trees and bushes are spawned to break up the sightlines, provide groundcover for gameplay and complete the forest aesthetic.
Outposts
The level generator depends on authored outposts to dot its landscape. These are designed to a handful of specifications.
Outposts should:
Provide multiple angles of approach.
They could spawn at, and by accessed by, any rotation.
Contain a range of combat spaces.
It’s easy in a primarily melee combat system to build frictionless arenas. A range of open areas, surveilled courtyards, winding corridors etc. can make similar encounters feel more varied.
Contain verticality.
Outposts should not:
Be entirely viewable from the outside.
This is to motivate movement, and encourage the player to physically explore an environment.
In this initial blockout, I was unhappy with the lack of verticality and limited angles of approach. It presented a nice set of environment possibilities (courtyard, hall, fortress wall), but needed some help getting there.
As the design progressed, I decided to knock down the far wall to provide another angle of approach and some extra verticality. A tangential benefit to this is that it broke up the visuals of the courtyard with a large rubble pile.