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
GamesNovember 22, 20266 min read

How to make a game like Temple Run

The 3D runner with turns adds one idea to the endless runner: the path itself bends, and you must swipe at the right moment or fall. Here is how the path, the camera and the chaser work.

Startbase Team
Editorial ink illustration of a toy wooden track forking at a right-angle junction with a tin runner mid-stride, the switch lever in ember orange

Key takeaways

  • Build the path from tiles (straight, turn, gap, low bar, high bar) chained by a generator that never puts two decisions too close at current speed.
  • Turns have a timing window that widens with speed so reaction time stays roughly constant.
  • A chaser behind the runner that gets closer after each stumble turns a mistake into tension instead of instant death. Its name, characters, setting and art belong to its owner.

Games like Temple Run are 3D endless runners in which the path turns: the character runs forward automatically along a narrow path, and the player swipes left or right to turn at corners, up to jump over gaps and down to slide under barriers. Miss a turn and you fall off the edge. A chaser following close behind punishes stumbles. To build one, you need a path generator made of tiles, swipe controls with forgiving timing, a camera that swings around corners, and a speed curve.

Temple Run, its explorer characters, its ancient-ruins setting, its chasing creatures and its art belong to its owner. The 3D runner with turns is a widely used genre format. Your game needs its own character, setting, chaser and look.

Why turning runners feel so urgent

  • The path is the threat. Every corner is a decision with a deadline, which keeps attention locked.
  • Swipes match the action. Swipe right to turn right is about as direct as touch controls get.
  • Something is behind you. A visible chaser makes running feel like escape, not commuting.
  • One more run. Runs are short, deaths are clear, restarts are instant.

The path as tiles

Build the path from short tiles, each a fixed length (for example 10 meters), with a type and an exit direction:

  • Straight: plain path, optionally with coins.
  • Turn left / turn right: the path ends at a wall and continues 90 degrees to one side.
  • Fork: a T-junction where both directions continue; the generator picks one to keep and drops the other after the player commits.
  • Gap: a missing section to jump.
  • Low barrier: slide under. High barrier: jump over.
  • Narrow ledge: the path shrinks to one side, so the player must lean or shift (optional).

The generator keeps about 8 to 12 tiles ahead of the runner, removes tiles behind, and recycles them (object pooling, so phones do not stutter). Rules: never two decision tiles (turn, gap, barrier) closer than the minimum reaction distance at the current speed; never turn back on the path in a way that overlaps earlier tiles (track the bounding box of recent tiles, or always alternate left and right over a few turns); introduce tile types gradually. The endless runner guide covers chunk pools and the reaction-distance idea in detail.

Swipe controls and timing windows

  • Swipe detection: a swipe is about 30 to 50 pixels of movement within roughly 0.25 seconds; direction is the dominant axis. Act on the swipe as soon as the threshold is crossed, not on finger lift.
  • Turn window: a turn swipe counts if it lands from about 4 meters before the corner to 1 meter after it. Widen the window in meters as speed rises so the time window stays near 0.4 to 0.5 seconds.
  • Buffer: a turn swiped early (before the window) is remembered and applied when the window opens.
  • Jump and slide: jump lasts about 0.7 seconds of airtime; slide lasts about 0.8 seconds. A swipe down mid-jump cancels into a fast drop.
  • Lateral shift: small left-right movement within the path width, for coins and ledges, driven by tilt with a touch fallback or by short swipes.

The mobile touch controls guide covers swipe thresholds and buffering in more depth. Test on a real phone early: swipe recognition that feels fine with a mouse often misfires with a thumb.

The camera around corners

The camera sits behind and above the runner (about 4 meters back and 2.5 up, looking slightly down). On a turn, rotate it around the runner over about 0.2 to 0.3 seconds with easing, not instantly: a snap is disorienting, a slow swing makes the next obstacle invisible. Pull the camera back and widen the field of view slightly as speed increases, so the player sees farther ahead. The game camera guide covers follow cameras and easing.

Speed, stumbles and the chaser

Start at a speed where a new player survives 20 to 30 seconds, then increase on a curve that flattens (for example, approaching 1.8 times the start speed over a few minutes) with a hard cap. Past the cap, difficulty comes from denser decision tiles.

The chaser adds a middle ground between fine and dead. Clipping the edge of a barrier, or a slightly late turn inside a grace zone, causes a stumble: the runner slows for a moment and the chaser jumps closer, visible on screen. A second stumble within about 10 seconds ends the run. If the player runs clean, the chaser falls back out of view. That makes near misses dramatic and teaches without punishing every small mistake.

Coins, power-ups and reasons to return

  • Coin trails that lead along safe lines teach the path and reward lateral shifts.
  • Power-ups: a magnet, a shield that absorbs one stumble, a short sprint that auto-turns. Distinct shapes and sounds for each.
  • Missions like "run 1,000 meters without collecting coins" give runs different goals.
  • Upgrades bought with coins (longer power-ups, a second shield) give long-term progress. Keep them modest so skill matters.

For daily scores across devices, attach Startbase Cloud and keep a leaderboard table; the leaderboards guide covers daily boards and cheating.

Three twists that make it yours

  1. 01A vehicle instead of feet. A runaway mine cart, a sled down a glacier, a paper boat on gutters after rain. Turns become drifts, jumps become hops.
  2. 02Forks with meaning. At each fork, one way is safer and the other has more coins and harder tiles. Routes become a risk choice, not a coin flip.
  3. 03The chaser is a force, not a creature. A rising flood, an avalanche, a wall of fog. It changes the mood and frees you from the obvious monster-chases-explorer image.

A brief to paste into Startbase

A 3D endless runner for phones, portrait, called Glacier Dash. A penguin on a little wooden sled races down a winding ice chute while an avalanche roars behind it. The path is built from 10-meter tiles: straight, left turn, right turn, fork, crevasse to hop, low ice arch to duck under, snow wall to hop over. The generator keeps 10 tiles ahead, recycles tiles behind, never places two decision tiles closer than the reaction distance for the current speed, and never lets the path overlap itself. Swipe left or right to drift around turns (the window widens with speed so it stays near half a second; early swipes are buffered), up to hop, down to duck. Tilt or short swipes shift the sled sideways within the chute to grab fish. At forks, the left or right way differs: one safer, one with more fish and harder tiles. Clipping an obstacle makes the sled wobble and the avalanche surges closer on screen; a second wobble within 10 seconds ends the run. Speed starts gentle and rises on a flattening curve to 1.8 times the start. The camera follows from behind and above and swings smoothly around turns. Power-ups: a fish magnet, a shield and a short turbo. On a crash, score, best and a Run again button that restarts in under a second.

For a ready-made brief in the side-scrolling style, see the endless runner prompt for phones. Publish your runner with one click and put it in the Arcade.

Common mistakes

  • Fixed turn windows in meters. At high speed they shrink in time until turns become impossible. Scale them.
  • Instant camera snaps. Ease the swing.
  • Paths that loop into themselves. Track recent tiles and avoid overlap.
  • Long-run drift. After many minutes of running in one direction, coordinates get large and physics jitters. Shift the world back toward the origin periodically.
  • One-hit deaths for small clips. The stumble-and-chaser system is kinder and more dramatic.

Frequently asked questions

How do 3D runners generate turning paths?

They chain short tiles (straights, turns, gaps, barriers) ahead of the player, recycle tiles behind, and follow rules about spacing decisions and avoiding overlaps so every path is fair.

What is a fair timing window for turns?

Aim for roughly 0.4 to 0.5 seconds of time to swipe, which means the window in meters must grow as the runner speeds up. Buffer early swipes too.

Can I make a temple running game with an explorer?

An explorer in ancient ruins chased by monsters is strongly associated with one game, whose characters and setting belong to its owner. A different character, setting and chaser keeps your game clearly your own.

Can a 3D runner work in a phone browser?

Yes, with pooled tiles, simple lighting and modest effects. Startbase builds 3D games on Three.js that open from a link without an install.

On this page

  • Why turning runners feel so urgent
  • The path as tiles
  • Swipe controls and timing windows
  • The camera around corners
  • Speed, stumbles and the chaser
  • Coins, power-ups and reasons to return
  • Three twists that make it yours
  • A brief to paste into Startbase
  • Common mistakes

Keep reading

More in Games
Editorial ink illustration of a wooden toy figure jumping between two stone ledges, the coin above the gap in ember orange
GamesNovember 22, 2026

How to Make a Platformer Game with AI

A platformer lives or dies on its jump. Here are the numbers behind a jump that feels fair, how to build levels around it, and how to get an AI agent to build both.

7 min read
Editorial ink illustration of a tin wind-up runner on track pieces laid down ahead of it, the next track piece in ember orange
GamesNovember 22, 2026

How to Make an Endless Runner Game

An endless runner is a level generator with a character on top. Get the chunks, the speed curve and the controls right and the rest is art.

6 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.