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

A Prompt for a 3D Marble Race

Rolling a marble down a twisting track is simple to explain and easy to get wrong. This brief gives the physics, camera and fall rules that make it feel good from the first build.

Startbase Team
Editorial ink illustration of a glass marble atop a spiraling wooden toy ramp, the swirl inside the marble in ember orange

Key takeaways

  • Specify the physics in plain numbers: marble size, gravity, friction and a top speed. Physics engines left on defaults feel floaty.
  • The camera is half the game in a marble race. Ask for a follow camera that looks ahead and never clips into walls.
  • Falling off must cost a second, not a run: respawn at the last checkpoint after a short beat.

Paste the prompt below to get a 3D marble race that plays in the browser: you roll a marble down a twisting track in the sky, against three rival marbles and your own ghost, with checkpoints so a fall costs a second, not the race. The 3D games template runs on Three.js with Rapier physics ready to switch on, and the brief gives the physics the numbers it needs so the marble feels heavy and quick instead of floaty. After the first build, the follow-ups move the track into the World Editor so you can shape it yourself.

The prompt to paste

Make a 3D marble racing game with Rapier physics, in a bright toy style: wooden and painted plastic track pieces floating above soft clouds, for desktop and phones (landscape). The player rolls a glass marble with a colored swirl down a track to a finish gate. Physics: marble radius 0.5 m, mass 1 kg, gravity 20 m/s squared (stronger than real, for snappier rolling), rolling friction low, track friction medium, bounce low. The player pushes the marble by applying torque in the input direction relative to the camera, with a top speed of 22 m/s on flat ground; speed above that only comes from slopes. A short jump (impulse of 6 m/s upward) usable only when touching the track, with a 0.1 s grace period after leaving an edge. Physics runs on a fixed 1/60 s step. Camera: follows 6 m behind and 2.5 m above the marble, looks 4 m ahead along the marble's velocity, turns smoothly with the direction of travel, and pulls closer instead of passing through walls. Track for v1: one course of about 60 to 90 s for a good run, with a start ramp, wide banked curves, a narrow bridge with no rails, a spiral down, a jump over a gap with a boost pad before it, a section of moving platforms, and a finish funnel. Boost pads add 8 m/s in their direction. Checkpoints: 5 glowing rings; falling below the track for 1 s respawns the marble at the last checkpoint with zero speed, with a short fade. Rivals: 3 AI marbles that follow a racing line along the track with small random variation, a top speed slightly below the player's best, and that can bump into the player physically. Ghost: after the first finish, a translucent ghost of the player's best run races along. Controls on desktop: WASD or arrows to push, Space to jump, R to respawn at the last checkpoint. On phones: a virtual stick on the left side and a jump button on the right, both at least 64 px; optional tilt steering in settings. HUD: timer to hundredths, position (1st to 4th), checkpoint count, best time. Feel: rolling sound pitch follows speed, a clack on landing, sparkles on boost pads, a slight camera shake on hard landings. Music: upbeat, light. Screens: title, countdown 3-2-1, HUD, pause, results with time, place and best time, Retry and Next buttons.

Why the brief asks for each thing

  • Stronger gravity. Real gravity at this scale makes the marble drift and float in the air for too long. Around 2 times real gravity is a common game trick for weight and speed.
  • Torque relative to the camera. Pushing up on the stick should roll the marble away from the camera, whichever way the track turns. Without this rule, controls feel reversed after the first curve.
  • A top speed from input only. The player's push has a ceiling; slopes and boost pads do not. That makes the track design, not button mashing, decide where speed comes from.
  • Jump grace. A short window after leaving an edge (often called coyote time) forgives late presses and avoids the feeling that the jump did not work.
  • Fixed physics step. Physics that runs with the frame rate behaves differently on fast and slow devices. A fixed step makes the course the same for every player, which matters for times and ghosts.
  • The camera paragraph. A camera that lags behind or clips into walls is the top complaint in 3D rolling games. Our game camera guide covers follow distance and lookahead in more depth.
  • Checkpoints with a 1 s rule. Falling is part of the fun. Restarting the whole race is not. One second of falling before a fade lets the fall read clearly.
  • Rivals and a ghost. Rivals make the first race feel alive; the ghost turns the same track into a time-trial puzzle for replays.

The first three follow-ups

  1. 01Make the track a level. Build the track from separate pieces (straight, curve, ramp, bridge, spiral, boost pad, checkpoint ring, moving platform) placed in the level scene, so I can move, rotate and duplicate them in the World Editor. The rivals' racing line should follow the checkpoints, so it keeps working when I change the track.
  2. 02Tune the roll. Add Engine panel dials for gravity, top speed, push torque, jump impulse, boost strength and camera distance and height, so I can tune while racing.
  3. 03Add two more courses. Add a second course in an ice world (lower friction, wider track) and a third in a candy factory (conveyor belts that push the marble sideways). Unlock each by finishing the previous one.

With the track in the World Editor, you can also make a model from a sentence for scenery, such as a windmill beside the spiral, and hand edits there do not use credits. Expect to spend most of your time here: track design is the game.

Variations

Tilt the world instead of the marble

Replace the torque control with: "The player tilts the whole course up to 15 degrees in the input direction and gravity does the rest." This is the classic tilting-maze feel. It suits slower courses with narrow paths and collectibles, and it works well with phone tilt.

Watch-and-cheer marble race

Remove player control. Twelve named marbles race down a long chaotic course with obstacles, and players pick a favorite before the race and see whether it wins. Add a seed so each race can be replayed. With a room server, friends can pick and watch together, and that version needs a paid plan to publish with its server.

Things that go wrong, and what to ask

  • The marble falls through the track at high speed. Ask for continuous collision detection on the marble and thicker collision shapes on thin track pieces.
  • The marble bounces on seams between pieces. Ask: "Merge the collision of adjacent flat pieces or round their edges slightly, and check the full course at top speed for bumps."
  • The camera spins wildly when the marble stops. Its direction comes from velocity, which is near zero. Ask for the camera to keep its last direction when the marble is slower than 1 m/s.
  • Rivals fall off constantly or never. Ask for rivals to slow down before marked curves and to respawn at checkpoints like the player, with a dial for their speed.
  • Phones run hot. Ask for simpler shadows, fewer lights and a lower render resolution on phones. The phone performance guide explains the main costs.

Where to go from here

For the wider genre decisions, read how to make a racing game; for keeping a 3D scope small enough to finish, how to make a 3D game without coding. When one course plays well on a phone, publish it and share the link with a best time to beat.

Frequently asked questions

Does the marble race need a physics engine?

Yes. Rolling, bouncing and bumping into rivals are physics problems. Startbase 3D games run on Three.js with Rapier physics ready to switch on, and the brief asks for it by name.

Can I build the tracks myself?

Yes. The first follow-up turns the track into pieces placed in a level, which you can then move, rotate and duplicate by hand in the World Editor.

Will it run on phones?

It is built for phones and desktop. 3D is heavier than 2D, so test on the oldest phone you care about and ask for lighter shadows and lighting if it runs hot.

On this page

  • The prompt to paste
  • Why the brief asks for each thing
  • The first three follow-ups
  • Variations
  • Things that go wrong, and what to ask
  • Where to go from here

Keep reading

More in Prompt library
Editorial ink illustration of an open seed packet beside a wooden hoe and a watering can, one sprouted seed in ember orange
Prompt libraryNovember 22, 2026

A Prompt for a Cozy Farming Game

Paste this brief to get a calm, playable farm on the first build: four crops with real numbers, an eight-minute day, two seasons and controls that work under a thumb.

7 min read
Editorial ink illustration of an iron dungeon key, a die and a skull candle holder, the candle flame in ember orange
Prompt libraryNovember 22, 2026

A Prompt for a Roguelite Dungeon Crawler

One brief for a top-down roguelite that is fun on the first build: a dodge with real frame values, enemies that telegraph, relics that change runs and a hub that keeps progress after death.

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.