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 Rhythm Tapping Game

A rhythm game is a promise that taps line up with music. This brief builds the parts that keep that promise: the audio clock, timing windows, calibration and a way to map songs by tapping along.

Startbase Team
Editorial ink illustration of a brass metronome beside a hand drum with crossed drumsticks, the pendulum weight in ember orange

Key takeaways

  • Time everything from the audio clock, never from frame time. It is the single most important line in a rhythm game brief.
  • Ship a calibration screen. Phones, speakers and Bluetooth headphones all add different delays.
  • Ask for a record mode where you tap along to author beat maps. It is faster and more musical than writing them by hand.

The prompt below builds a rhythm tapping game for the browser: notes fall down four lanes toward a hit line, you tap when they arrive, and timing windows decide Perfect, Good or Miss. It also builds the three things that separate a rhythm game from a game with music in it: everything timed from the audio clock, a calibration screen for each player's device delay, and a record mode that lets you author a song's notes by tapping along. Paste it into Startbase, play the first song, then calibrate before judging the timing.

The prompt

Make a 2D rhythm tapping game for phones (portrait) and desktop, in a neon-on-dark style with soft glows. Four vertical lanes; notes scroll down toward a hit line near the bottom. Note types: tap notes, and hold notes with a tail that must be held until the tail ends. Timing is measured from the Web Audio clock, never from frame time; note positions are computed every frame from the current song time. Timing windows: Perfect within 45 ms of the note time, Good within 90 ms, otherwise Miss; a hold note that is released early counts as Good if at least 80 percent was held. Scoring: Perfect 300, Good 100, Miss 0, multiplied by a combo bonus that rises by 0.1 every 10 notes up to 2x and resets on a Miss. Health: a bar that drops on misses and refills slowly on hits; at zero the song fails, with an option in settings to turn failing off. Songs: generate 3 original instrumental tracks of about 90 s each, at fixed tempos of 100, 120 and 140 BPM, each starting with a 2 beat count-in. Store each song's BPM and the offset of its first beat. For each song, make an Easy chart (notes mostly on beats, 1 lane at a time) and a Hard chart (eighth notes, chords of 2, hold notes), stored as data: time in beats, lane, and length for holds. Note speed is set in settings from 1 to 10. Calibration: a screen where a click plays every beat and the player taps along for 16 beats; the average difference becomes the audio offset applied to all judging; also a visual offset test. Record mode, hidden behind a setting: play a song and tap lanes to record notes; recorded times snap to the nearest sixteenth note at the song's BPM; the result can be saved as a chart and played. Controls: on phones, tap the lower part of each lane (the whole lane width, at least 72 px); on desktop, D F J K for the four lanes. Multi-touch for chords. Feel: a burst and lane flash on hit, the text Perfect or Good popping above the line, the combo counter pulsing on the beat, the background pulsing gently with the music. Screens: song select with difficulty and best score, calibration, gameplay HUD (score, combo, health), results with accuracy percentage, counts of Perfect, Good and Miss, max combo and a letter grade. Save best scores in the browser.

Why each part is in there

  • The audio clock line. Browser frames do not arrive at perfectly even times, and the music keeps playing at its own pace. Positioning notes from the audio clock keeps notes and sound locked together. Without this line, notes slowly drift away from the music over a song. The rhythm game guide explains beat maps and audio latency in depth.
  • Timing windows in milliseconds. 45 and 90 ms are generous starting values for a casual tapping game. Tighter windows are for later, harder modes.
  • Fixed tempos and a first-beat offset. Charts are written in beats, and beats only map to seconds if the song's tempo and first beat are known. Asking for generated music at fixed tempos gives the charts something to stand on. Check the result by ear: if the beat does not line up, record mode below is the fix.
  • Calibration. Every device adds its own delay between a tap and the sound you hear, and Bluetooth headphones add a lot more. A 16-tap calibration lets every player correct for their own setup. Without it, good players on some phones will feel cheated.
  • Record mode. Writing charts as numbers is slow and unmusical. Tapping along to the music, snapped to the beat grid, gives you a first chart in 90 seconds, which you then clean up.
  • Whole-lane tap zones. Small buttons get missed at speed. The whole lower lane as a target fits thumbs and allows chords with two fingers.

Three follow-up prompts

  1. 01Check the sync. Play each song with a metronome click on every beat over the music and tell me if any song's beats drift from the click. If one does, fix its BPM or first-beat offset until they match for the full song.
  2. 02Clean my recorded chart. Load the chart I recorded for the 120 BPM song, remove notes closer than a sixteenth to each other in the same lane, and make sure no chord needs more than 2 fingers on Easy.
  3. 03Add a practice mode. Let players pick a section of a song and play it at 75 percent speed, looping, with no health bar.

Generated music is a strong start but not a guarantee of a perfectly steady tempo, so the first follow-up checks it. For more on making music and sound with AI, and on what to listen for, see generating sound effects and music and the game music guide.

Two variations

One-button rhythm runner

Replace the lanes with a character running to the right on a beat grid: obstacles arrive on beats and one tap jumps them. Keep the audio clock, windows and calibration. It is easier to learn and plays well with one thumb.

Bring your own beat

Let players load their own audio file, enter or tap its tempo, then record a chart in record mode and play it. This is a creative tool more than a game, and it relies on the player owning the rights to the music they load, so keep it local to their browser.

What usually goes wrong, and how to ask

  • Notes feel late on every hit. Usually the device delay. Run calibration first. If it is still off on every device, ask: "Show the average timing error of my last song on the results screen, early or late in ms."
  • The music starts before the first tap on phones and gets blocked. Browsers only allow audio after a user gesture. Ask for audio to be unlocked on the first tap of the title screen.
  • Notes stutter. Ask for positions computed from song time each frame and for nothing else heavy to happen during play, such as creating new objects for every note: pool them.
  • Two-finger chords register one tap. Ask for full multi-touch handling on the lanes and test chords on a real phone.
  • Hold notes end early when the finger slides. Ask for a hold to stay active while the finger stays anywhere in its lane, even if it slides up or down.

Honest limits

Browser audio is good enough for a fun, fair rhythm game when it is built on the audio clock with calibration. It is not a match for dedicated rhythm game hardware with extremely tight windows, and Bluetooth headphones will always add delay. Keep windows generous, ship calibration, and publish. Then watch players' accuracy on the results screen to see if your windows feel right.

Frequently asked questions

Why do rhythm games feel out of sync in the browser?

Usually because notes are timed from frames instead of the audio clock, or because the device adds output delay. Timing from the audio clock and adding a calibration screen fixes most of it.

Can Startbase make the music too?

Yes, the agent can generate music and sound effects for your game. Ask for fixed tempos so charts can be written in beats, and check by ear that the beat stays steady.

How do I make beat maps?

Use a record mode: play the song, tap along on the lanes and snap the taps to the beat grid. Then clean up the chart, by hand or by asking the agent.

On this page

  • The prompt
  • Why each part is in there
  • Three follow-up prompts
  • Two variations
  • What usually goes wrong, and how to ask
  • Honest limits

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.