Sculpting Side B: Generating the terrain of Alpha Periphery C2
Greetings surveyors!
In the upcoming free content expansion for Periphery Synthetic EP, you will scale the icy vistas of Alpha Periphery C2 to unlock new abilities and reach extraordinary heights. Continue reading for an in-depth look at how its terrain differs from the vast deserts of Alpha Periphery B, and how this impacts the EP’s approach to movement.
Enjoy!
Initial concept
With the release of Side B, I intend to fulfil my promise to faithfully remake my game E.X.O.. Created for No Video Jam 2, it was an ambitious attempt to create a procedurally-generated terrestrial world that could be accessibly explored in all three dimensions. It was also my first attempt at this—and rather rushed for a three-week game jam—therefore, I did not take many risks with its terrain generation.
I believe that a faithful remake should embrace verticality in its level design. By expanding the dynamic range of its terrain to deeper lows and towering heights, the included jetpack abilities receive renewed context and purpose. The result is the ultimate and intended experience of this icy world—which I was previously unable to deliver—until now.
Raising the mountains
The most exciting addition to the new terrain is its mountains. Reaching up to four kilometers in height, they provide surveyors quite a challenging platforming experience. Their rewards: a unique artifact to collect, a destination to revisit at any time, a view that nearly reaches outer space, and a satisfying leap back to the surface.
The mountain algorithm
While researching the best approach, I discarded several ideas like using an inverse fourier transform or the diamond-square algorithm, before landing on a surprising solution: a maze generation algorithm, specifically a modified Randomized Prim’s algorithm.
By using a maze to represent the topology of a mountain from above, it’s ensured that there are multiple random paths to reach its peak. And specifically, with the Randomized Prim’s algorithm, the mountain can be generated from any arbitrary origin with any shape and depth, not just a boring rectangle.
Here it is in pseudocode, transcribed from a note I scrawled late one night:
- Define a two-dimensional hash of cells.
- Keep a set of
visited
andunvisited
cells.- At the origin:
- Assign it an arbitrary
depth
such as25
.- Mark it as a
visited
cell.- Gather all adjacent cells and add them to
unvisited
.- While there are
unvisited
cells:
- Pick a random
unvisited
cell.- Pick a random
visited
adjacent cell.- Assign it a
depth
of thatvisited
cell minus1
.- Mark it as a
visited
cell.- If its depth is greater than
1
, gather all adjacent unvisited cells and add them tounvisited
.
To get the height of the mountain at any cell, we multiply its depth
value by a scalar.
I chose the number equal to its grid size so its slope remains a constant 45 degrees; however, this could be any arbitrary value.
For example, a fractional value could be used for shallower terrain features like rolling hills, or negative values could be used to instead carve out canyons.
Here is the result, visualized from the top-down with special tooling I created to preview the terrain. It uses hue and value to represent elevation changes at various scales, and the results can be quite psychedelic:
The special sauce
Apparent from the checkered patterns on display, we’re missing a few ingredients that turn this grid of disconnected platforms into a more realistic and certifiably-walkable place:
- Interpolation. A combination of bilinear and bicubic interpolation was added to smooth the edges of grid cells into one another. To control the type of interpolation, a field of two-dimensional Simplex noise was used to make some areas more smooth or jagged than others.
- Bias.
In steps 4.1 and 4.2 of the pseudocode, bias can be introduced in the random selections of cells.
Similarly, in step 4.3 we can subtract random integers to create steeper areas (i.e. greater than
1
) or flat areas for rest (i.e.0
). These choices have very interesting cascading effects that completely change the shape of the mountain. - Peaks. Finally, in step 3 of the pseudocode, we can randomly generate multiple origins for the mountain. This allows them to have double summits and more, further increasing their diversity.
Here is the result, rendered with the same visualizer as before:
And a different result, rendered in-engine and ready-to-climb:
Filling the lowlands
The areas between the mountains pull the terrain in the opposite direction, carving out a variety of frozen biomes which demonstrate the moon’s violent past. While the underlying techniques are largely identical to the deserts of Side A, the expectation that surveyors should have the jetpack unlocked allows it to take bigger risks.
At its flattest, in the absence of environmental weathering and erosion, the crystalized terrain exhibits some sharper edges. I’ve seen plenty of voxel-based games having terrain like this, and I felt it was most appropriate to give those blocky worlds a nod here:
Fun Fact: The terrain of Periphery Synthetic EP is continuous, not voxel-based. This actually leads to a ton of interesting problems—and creative solutions—especially with its movement system.
The environments of Periphery Synthetic EP are carefully crafted to complement its story. This includes the frozen seas of Alpha Periphery C2, which indicate a warmer past that was abruptly upended. Also hinted here is one of ten new materials coming with the expansion:
The deepest of its canyons can extend up to a kilometer in depth, providing surveyors with even more platforming challenges to solve with their jetpacks:
Reconsidering movement
While building this terrain I’ve started to identify several core problems with the EP’s movement system that I intend to address in the Side B release:
- Grappling. A new ability will be introduced for on-foot movement which allows surveyors to grapple terrain as they collide with it. This solves issues with collision detection while jumping and being unable to control where they land. By holding the Left Bumper before colliding with a surface, they will always stick the landing. This will be unlocked by default, and includes a unique audio cue when activated.
- Walking. While turbo is disengaged on-foot, surveyors will always stick to the nearest surface unless they jump. This solves issues with traversing extremely steep slopes, like losing their footing, by allowing them to opt-in to more careful movement. However, for grappling to remain useful, this will not apply to mid-air collision detection.
- Jumping. When using vertical look, surveyors will now launch themselves more in that direction. This solves the unpredictability of jumping up or down steep slopes by giving them even more precise control over their jumps. For those who prefer to use the Lock Vertical Look setting, the behavior will remain mostly the same as before.
Please let me know if you have any feedback on these proposed changes. These will be part of the target for my next development sprint.
Coming soon
In addition to faithfully reimagining its graphics and terrain, there are many other tasks along the happy path toward full release. This includes remaking one of my proudest game soundtracks, all the new abilities and sounds to support them, and the nonlinear portals that connect these worlds.
Thank you so much for joining me on this wild journey. I’m excited to share more with you soon, including the official release date for Side B! Until then, the code won’t generate itself. ✌
Wishlist on Steam
Get Periphery Synthetic EP
Periphery Synthetic EP
Extrasolar musical explorer
Status | Released |
Author | shiftBacktick |
Genre | Adventure |
Tags | Atmospheric, Colorful, Exploration, Metroidvania, Non violent, Open World, psychedelic, Relaxing, Sci-fi, Walking simulator |
Languages | English |
Accessibility | High-contrast, Blind friendly |
More posts
- Nominee at the Indie Game Awards1 day ago
- v3.2.7: Side D progress update10 days ago
- Overanalyzing and Synthesizing: Periphery Synthetic at GAconf 202420 days ago
- v3.2.6: Steam release hotfix61 days ago
- v.3.2.5: Wrapping up release week83 days ago
- v3.2.4: Addressing your feedback84 days ago
- v3.2.3: Steam release hotfix87 days ago
- v3.2.2: Steam achievements hotfix89 days ago
- v3.2.1: Release hotfix90 days ago
- v:3.2.0: Steam release and expansion reveals91 days ago
Leave a comment
Log in with itch.io to leave a comment.