Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
Game mechanicsNovember 22, 20266 min read

How to Make a Quest System

Quests are easy to write and easy to break. Here is an event-driven design for objectives, the fields every quest needs, journal and marker rules, and the classic bugs that strand players.

Startbase Team
Editorial ink illustration of a leather notebook held open by a brass compass with three ribbons, the shortest ribbon in ember orange

Key takeaways

  • Drive objectives from game events (enemy killed, item picked up, area entered, conversation ended), not from code sprinkled through enemies and doors.
  • Recheck objectives when a quest starts: the player may already hold the items or have visited the place.
  • Every quest-critical item, character and door needs a rule for what happens if it is lost, killed or skipped.

To make a quest system, store each quest as data (id, title, giver, a list of objectives, rewards and prerequisites), have the game broadcast simple events like "enemy killed", "item collected" and "area entered", and let one quest manager listen to those events and tick objectives forward. A journal shows active quests, one tracked quest drives an on-screen marker, and the save stores each quest's state and objective counters. The hard part is not the structure. It is the dozen ways a player can strand a quest, which this guide lists.

The RPG guide covers the basic idea of a quest as named states. This article is about the machinery under it: how objectives get counted, how quests connect, and how to stop them breaking.

A small set of objective types

Almost every quest in almost every game is built from six objective types. Supporting exactly these (with parameters) covers far more content than writing special code per quest:

  • Collect: have N of an item (`item: "wolf-pelt", count: 3`). Usually checks the inventory rather than counting pickups, so items you already had count too.
  • Defeat: kill N enemies of a type, or one named enemy.
  • Reach: enter an area (a trigger zone placed in the level).
  • Talk: finish a specific conversation, often with an effect node in the dialogue system.
  • Deliver: hand an item to a character, which removes it from the inventory.
  • Interact: use an object (pull a lever, light a brazier, read a sign).

Objectives run either in sequence (step 2 appears after step 1) or in parallel (gather three herbs from anywhere, in any order). A quest is complete when its final objective group is complete, and turning it in is its own Talk or Deliver objective, so reward handling stays in one place.

Events, not hard-wired calls

The most common way quests get built badly: the wolf's death code says 'if the pelt quest is active, add one to its counter'. Ten quests later, enemies, chests and doors are full of quest checks and nobody can tell which quest touches what. Instead, every system emits one generic event (`enemyDefeated { type: "wolf" }`, `itemAdded { id: "wolf-pelt" }`, `areaEntered { id: "old-mill" }`) and the quest manager is the only thing that knows which quests care.

This also gives you a debugging tool for free. Log every event with a timestamp in a debug view and a stuck quest becomes a question you can answer: did the event fire, and did its id match the one in the quest data? A typo like `wolf_pelt` against `wolf-pelt` is the single most common reason a quest never completes.

The fields a quest needs

  • id, title, summary: the summary is one sentence the journal shows ("Bring three wolf pelts to Mara in the mill").
  • giver and turn-in character: often the same, not always.
  • prerequisites: other quests completed, a level, a flag. Locked quests should not appear at all; available ones can show a marker over the giver.
  • objectives: type, parameters, count, order group, and an optional hint per objective.
  • rewards: XP, currency, items, flags, and any quest this one unlocks.
  • fail conditions (optional): a timer, an escort dying, a choice. Most quests in a small game should not be able to fail at all.
  • repeatable: for daily or bounty-board quests, with a cooldown in game days or real hours.

How many quests, and how long

For a first game, aim for one main questline of 6 to 10 quests and 4 to 8 side quests, each taking 3 to 10 minutes. Keep objectives per quest between 2 and 4. Rewards for side quests should be worth roughly 1.5 to 2 times what the player would earn spending the same time fighting, or players learn to ignore them.

The bugs that strand players

A softlocked quest is worse than a crash, because the player loses hours before noticing. Test each of these on purpose:

  • Done before it started. The player already killed the wolves or holds the pelts when the quest begins. On start, recheck every objective against current state: inventory counts, defeated named enemies, visited areas.
  • The quest item was sold, dropped or used. Mark quest items as unsellable and undroppable, or re-check Collect objectives when the inventory changes so the counter goes back down (and the quest step returns to active).
  • The giver died. If characters can die, either make quest characters unkillable, or move turn-in to a fallback (a notice board, a relative).
  • One-time events. A boss that never respawns was killed before the quest that needs it was active. Record a permanent flag for one-time kills and check it on start.
  • Quest order assumptions. Two side quests both give the same unique item. Whichever finishes second gets confused. Search the data for duplicate unique rewards.
  • Save mid-update. The reward was given but the quest state was not saved as complete, so reloading gives the reward again. Apply completion and rewards together, then save once.
  • Renamed ids after an update. Old saves reference a quest id that no longer exists. Keep a small migration map from old ids to new ones.

Tip

Ask the agent for a debug panel that lists every quest with its state and counters, plus buttons to complete an objective or reset a quest. It turns a 40-minute replay into a 10-second check. Save a checkpoint before big quest changes so you can compare behavior.

Journal, tracking and markers

Players need to know three things at any moment: what they are doing, where, and what they get. A journal answers the first and third; a tracked quest answers the second. Let the player track exactly one quest at a time (auto-track the newest main quest step), show its current objective as one short line on the HUD (for example 'Wolf pelts 2/3'), and point a marker at the target: an arrow at the screen edge when off screen, a small icon above it when on screen. Hide the line for 2 to 3 seconds after it updates and then fade it to lower contrast, so it informs without nagging.

Markers pair naturally with a minimap: the tracked target appears as a pin, clamped to the map edge when outside its range. In open-ended games some players prefer hints to markers, so a "Show objective markers" setting costs little and pleases both groups.

How quests combine with other systems

Quests are glue. They reward the loot tables you built, give reasons to explore the parts of the map behind fog of war, introduce recipes for crafting, and pace a story. A good rhythm is to let each main quest introduce one system or area, and let side quests reuse that area with a twist. In survival and farming games, repeatable requests ("deliver 10 tomatoes this week") turn the economy into goals without new content.

A quest system brief to paste

Add an event-driven quest system to my 2D top-down RPG. Systems emit events: enemyDefeated(type, uniqueId), itemAdded/itemRemoved(id, count), areaEntered(id), conversationEnded(id), objectInteracted(id). One quest manager listens and is the only code that knows about quests. Quests live in one data file: id, title, one-line summary, giver, turn-in character, prerequisites, objectives (collect, defeat, reach, talk, deliver, interact; with count, order group and hint), rewards (XP, gold, items, flags, unlocked quests), repeatable flag. On quest start, recheck all objectives against current inventory and flags. Quest items cannot be sold or dropped. Journal screen with Active and Completed tabs; track one quest, show its current objective on the HUD, and point an arrow at the target when off screen. Save quest states and counters with the game save, applying rewards and completion together. Add a debug panel to list, advance and reset quests. Start with a three-quest chain for the miller.

Frequently asked questions

How do quest systems work in games?

Most use quest data (objectives, rewards, prerequisites) plus a manager that listens to game events like kills, pickups and conversations. When an event matches an objective, the counter advances, and when all objectives are done the quest can be turned in.

Why does my quest not complete?

Usually the event fired with a different id than the quest expects, the objective was already satisfied before the quest started, or a quest item was removed. Log events and recheck objectives when a quest begins.

Should quests be able to fail?

Rarely in a small game. Failure adds edge cases (what resets, what stays) and players often reload anyway. Use it for timed or escort quests where failing is part of the tension, and make retrying easy.

How many quests does a small RPG need?

A main line of about 6 to 10 quests and a handful of side quests is enough for a first game of an hour or two. Make each one take a few minutes and reuse areas with a twist rather than building new ones.

On this page

  • A small set of objective types
  • Events, not hard-wired calls
  • The fields a quest needs
  • The bugs that strand players
  • Journal, tracking and markers
  • How quests combine with other systems
  • A quest system brief to paste

Keep reading

More in Game mechanics
Editorial ink illustration of a wooden toy figure in mid-air above a gap, the puff cloud under its feet in ember orange
Game mechanicsNovember 22, 2026

How to Add a Double Jump to Your Game

A double jump is one counter and one reset rule, but the details decide whether it feels like control or like cheating. Here are the values and the bugs to watch for.

8 min read
Editorial ink illustration of a small figure streaking along a stone floor with faded ghost copies behind it, the front figure's scarf in ember orange
Game mechanicsNovember 22, 2026

How to Add a Dash Move

A dash is a short burst of fixed speed that overrides normal movement. Get its distance, its ending and its refill rule right and it becomes the move players use most.

7 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.