Guide

Keys and doors: designing puzzle platformer levels

Keys and doors turn a run into a small puzzle: the player has to find the right path before going fast. Here is exactly how they work in Bazoocraft, and five patterns to build great levels with them.

How keys and doors work

Keys and doors come in five colors: red, blue, green, yellow and purple. The rules are simple:

  • A key is kept: once picked up, a key stays in the player’s inventory for the rest of the run. It is not used up.
  • A key opens its color: touching a door of the same color opens it, and the key keeps working on every other door of that color.
  • Doors open together: doors of the same color that touch each other open at once, so a door several tiles tall opens in one go.
  • Locked means solid: without the right key, a door is a wall, and the game tells the player which key they need.

Pattern 1: the locked goal

Put the last diamonds, or the exit door, behind a door, and hide the key somewhere else in the level. The player sees the goal right away and has to go find the key: the level gets a clear direction and a turning point halfway through.

Pattern 2: the key in sight

Show the key early, out of reach, and let the player work out how to get to it: a spring hidden lower down, a moving platform, an enemy to stomp for extra height. Seeing the reward before knowing the path is one of the most satisfying feelings in a platformer.

Pattern 3: the color chain

Lock the blue key behind a red door, the green key behind a blue door, and so on. Each key opens the next area, which gives the level a natural order. Two or three colors are enough: beyond that, players lose track of what they are looking for.

Pattern 4: the shortcut for speedrunners

Use a door to open a shortcut back toward the start or across the level. A first-time player takes the long way; an expert who knows the level grabs the key early and saves seconds. It gives your leaderboard depth, as explained in our level design tips.

Pattern 5: the optional risk

Offer two routes to the same area: a safe one through a door whose key takes time to fetch, and a risky one between saws that needs no key at all. Players choose between safety and speed, and the best runs will always take the risk.

Avoid levels that trap the player

Every key must be reachable, and the player must never be able to get stuck in a place they cannot leave: for example, a pit closed by a one-way drop where the key is not. When in doubt, add a way back. Pressing R restarts the run, but a level that forces a restart without explanation feels unfair.

Test the obvious mistakes too: going for the door before the key, or going for the key from the other side. Keys and doors mix very well with switch blocks for more complex puzzles.