Devlog 3: Adding Obstacles
Gravity Labs is an infinite runner style game. Therefore we need to add challenges to the game to make sure it is interesting to play. The game level is comprised of a series of open-ended octagonal models, with one end rotated 8 degrees to produce a gentle spiral effect. This is known mathematically as a heilicodal octagonal tunnel. The player moves along what is initially the top and bottom faces of this shape, and even as it rotates the player’s movement follows that shape.
This means that we have two surfaces onto which obstacles can be directly placed what will cause the player to need to flip gravity in order to avoid. However, the other six faces do not go unused - they provide oppotunities for desigining more complex obstcales. For instance, we have a video game classic - the spike, which exists as either decoration on the six decorative faces, or as a simple obstacle the player needs to miss to continue. However, we also have the clock face, where a series of spinning clock hands will form the obstacle the player needs to avoid, and having the additional six sides helps to make the design of this obstacle clearer. Each tunnel ring that spawns can have one set of obstacles, a power-up or be blank.
The question is - how do we arrange these tunnel rings in the level generation? The immediate solution is to pick a tunnel ring at random - however this prevents us from having clearly defined different themes for the player to navigate through. Instead, we have a more complex generation logic where a theme is selected, and then tunnel rings are chosen using a probability for that theme. Each theme has an equal chance of being selected.
For example, if there are five different themes and one was ‘spikes’ then there would be a 20% chance the next theme would be spikes. Within the spikes theme each themed tunnel section has a probability of spawning. Let’s say: 35% chance of a spike on the top surface 50% chance of a spike on the bottom surface 15% chance of no spike on either surface
Where the probabilities are based on difficulty, so rarer tunnel sections are harder to complete.
With that said, we currently have the following unique themes that will occur: Spikes, Clocks, Saws, Lazers, Blocks and Turrets. Attached below is a sketch showing what each of these sections will look like:

You can see an early version of the game with a basic version of the spikes obstacle below:
Gravity Labs
This is an endless runner game where you flip gravity to survive - made with Unity 6000.3.3f1 for Windows and Android.
| Status | In development |
| Author | Thomas Jebson |
| Genre | Platformer |
More posts
- DevLog 5: Accessibility1 day ago
- Devlog 4: Designer Friendly Game Development8 days ago
- Devlog 2: Making Mechanics29 days ago
- Devlog 1: Getting Started36 days ago
Leave a comment
Log in with itch.io to leave a comment.