Procedural Platform Generation: How Endless Levels Work

Every Jumpyloo climb is unique. Here is how procedural generation creates endless levels that are always fair, always surprising, and always climbable.

Why Procedural Generation?

Jumpyloo is an endless climber — the character jumps upward through an infinite sequence of platforms until the player misses a jump. The game cannot have hand-designed levels, because there is no end. Instead, it must generate platforms on the fly, in real time, as the player climbs.

This is procedural content generation (PCG) — a technique where game content is created algorithmically rather than manually. PCG has a long history in game design: Rogue (1980) generated dungeons with random room layouts; Spelunky (2008) used procedural level generation to create infinite platforming challenges; and No Man's Sky (2016) generated entire planets. For Jumpyloo, PCG is not a feature — it is a fundamental design requirement.

How It Works

Jumpyloo's generation system runs on a simple principle: the next platform must always be reachable from the current one. This constraint, known in game design literature as the "guaranteed passage" requirement, means the algorithm must balance randomness with guardrails.

Here is the core generation loop, simplified:

  1. Track the player's height. The camera follows the player upward. When the highest generated platform is within a certain distance of the top of the screen, the generator triggers.
  2. Pick a horizontal position. The platform's x-coordinate is chosen randomly within a range that depends on the player's current position. The range widens at lower difficulties (more horizontal spread = easier jumps) and narrows at higher difficulties (more vertical focus = harder).
  3. Pick a vertical gap. The platform's y-coordinate is placed relative to the previous platform's height, with a gap that is randomly chosen but clamped to the player's maximum jump height minus a safety margin.
  4. Choose a platform type. Normal platforms are static. Moving platforms oscillate horizontally or vertically. Crumbling platforms break apart after a short delay. The platform type is weighted by difficulty level — crumbling platforms appear more frequently at higher heights.
  5. Add collectibles. Occasionally, small collectible items (glowing amber gems) are placed above or beside the platform, encouraging the player to aim for riskier jumps for a reward.
  6. Clean up. Platforms that have scrolled far below the player are removed from the scene tree to conserve memory.

In Godot, this translates to a script on a generator node that instantiates PackedScene resources (prefabricated platform templates) and positions them in world space. The platforms themselves are simple StaticBody2D nodes with rectangular collision shapes and sprite children.

Difficulty Curves, Not Strict Levels

Jumpyloo does not have traditional difficulty levels. Instead, the generation parameters shift continuously as the player climbs higher. Early platforms are wide, with generous vertical gaps. As the player ascends, platforms become narrower, gaps lengthen, and moving platforms appear more frequently. The curve is tuned so that new players can climb for several screens before encountering genuine challenge, while experienced players face consistently demanding jumps within the first minute.

Ensuring Fairness

The hardest problem in procedural generation is fairness — preventing the algorithm from creating an impossible jump. Jumpyloo's system handles this with a two-tier safety net:

Seeding and Reproducibility

Jumpyloo's generator uses a seeded random number generator. While the player experiences endless variety, the seed allows us to reproduce and debug specific level sequences during development. The seed is not exposed to the player — every climb is still unique — but it ensures that if a bug report mentions a specific platform configuration, we can re-generate that exact sequence for debugging.

The seed is initialized based on the current date and a session salt, so no two play sessions are identical even if the same player plays at the same time on consecutive days.

Learning from the Classics

Our approach draws heavily from the design principles articulated by Derek Yu in his postmortem of Spelunky's level generation system. Yu's insight — that procedural generation should create interesting choices, not random chaos — is the north star for Jumpyloo's platform generator. Every platform placement is an implicit question: "Can you make this jump?" The answer should always be "yes, but it requires focus." The generator's job is to keep asking that question in new ways, climb after climb.

Sources:
— Yu, D., Spelunky, design notes and postmortem, 2008–2013.
— Shaker, N., Togelius, J., & Nelson, M.J., Procedural Content Generation in Games: A Textbook and an Overview of Current Research, Springer, 2016.
— Godot Documentation, "Using PackedScene," docs.godotengine.org.
— Godot Documentation, "Random Number Generation," docs.godotengine.org.
— Smith, G. & Whitehead, J., "Analyzing the Expressive Range of a Level Generator," Proceedings of the 2010 Workshop on Procedural Content Generation in Games.