top of page

Level Generation Overview

    An endless runner isn't complete without an endless level. The level generator in this game uses random placement and population of platform chunks. These chunks are used to create a pseudo-random level that maintains control over undesirable spawn cases caused by true randomly generated platforms.

Generator

    The generator works on the idea of spawning pre-made chunks, populating those chunks with objects, and then moving the generator "brush" object to the right based on the width of that chunk.

    A chunk contains three elements: Platforms, interaction spawn points (shown in blue), and usually a dropoff spawn point (shown in yellow). Souls spawn over platforms at a random height and are handled on a whitelist of tiles. Tiles that are not added to this list cannot have souls spawned above them.
   The benefit of using this system over a more truly random system is control over spawns. The chunks allow level designers to designate where interactions can and cannot spawn, as well as control where and when death pits spawn.

Backgrounds and Parallax

    The parallax is handled on a layer-by-layer basis. Each layer randomly spawns a background based on a tileset, parents the tiles to the layer object, and shifts the layer group on the x based on the player's velocity.

bottom of page