How-to2 min read

Keys and Locked Doors: How to Make Platformer Puzzles

By the devbox.studio team at Forging Destiny Studios, LLC

Quick answer

In devbox.studio, players pick up a key tile and then walk into a locked door tile to open it. Door tiles that touch each other form one door, so a tall door takes one key. Use keys to make the player explore before progressing, guard secret rooms, or create branching puzzles where the order matters.

A locked door changes how a player thinks. Instead of running to the right, they start exploring: "where is the key?" Keys and doors turn any platformer level into a small puzzle.

How keys and doors work

  • Key: paint it anywhere. When the player touches it, they pick it up. The keys they are carrying show in the game's display.
  • Locked door: a solid tile. When the player walks into it carrying a key, the door opens and the key is used up.
  • Bigger doors: door tiles that touch each other count as one door. A door three tiles tall needs only one key.

Step 1: Block the path

Paint a column of locked door tiles across the main path, from the ground up to the ceiling or high enough that it cannot be jumped over.

Step 2: Hide the key somewhere interesting

Put the key off the main route: up a spring, past an enemy, or at the end of a side tunnel. The trip to get the key is the real level.

Step 3: Show the door first

Players should usually see the door before they find the key. That way they know what the key is for and feel smart when they bring it back.

Five puzzle layouts

  1. The detour: the door is on the main path; the key is in a cave below.
  2. The secret room: an optional door hides a room full of coins.
  3. Two keys, two doors: the player must find both, in any order.
  4. The vault: a key behind a moving platform ride, guarding the goal flag.
  5. The backtrack: the key is past the door's height, reached with a spring, and the player must come back.

Keep puzzles fair

  • Make sure the key is always reachable. Test play every route.
  • Avoid letting players use a key on the "wrong" door and get stuck. If a level has two doors and only one key, both choices should lead somewhere.
  • Use coins to hint at the path to the key.

The Cave Crawl template is a great base: its low ceilings make doors impossible to jump over. For more ways to guide players, see using coins to guide players.

Frequently asked questions

How do I add a locked door in devbox.studio?

Paint locked door tiles in the World tab and put a key tile somewhere in the level. The player opens the door by walking into it while carrying a key.

Does a tall door need more than one key?

No. Door tiles that touch each other count as one door and open together with a single key.

Make your own game today. It's free.

devbox.studio runs in your browser: pick a template, paint your hero, and play your level in minutes.

How-to2 min read

How to Make a Multi-Level Game with a World Map

Turn one platformer level into a full game: add levels, place them on a world map, pick paths, and choose unlock rules like clearing a level or collecting coins.