{Piano rhythm} Project Report
1. The Concept
NEON KEYS is a piano rhythm game: notes fall down eight glowing lanes, and you hit the matching key as they cross the glow line.
The problem it solves is simple — “how do you make tapping a piano feel like playing a song, not just a timing test?” The notes are the melody. Each song (Aurora, Tide, Starline) has its own chords and tune, generated live with the Web Audio API, so hitting a note also plays the pitch. You are not chasing random beads; you are performing the track.
Identity in one line: a dark neon piano where falling notes are the song, and a clean hit sounds like music.
Easy to start (title → pick a song and difficulty → Play → 3-2-1-GO). Room to grow for experts through tighter timing windows, faster falls, chord-lane extras on Hard, combo multipliers, gold STAR notes, and a FEVER meter that doubles score for a few seconds. Miss five notes and the song is over.
Built as a smartphone-first music game (title → play → pause / complete / failed), guided by the Sakurai-style design rules in the repo: one job per screen, fun first, beginner-simple with depth through songs and difficulty.
2. The Stack
Kept deliberately thin so a full game could ship in one day:
App shell — index.html + style.css + script.js No build step, open and play Dark near-black stage, glass panels, neon pink / purple / cyan
UI — HTML + CSS (Manrope + Syne, CSS variables, safe-area insets) Touch vs desktop copy (hide A S D F · J K L ; on phones) Overlays: start, pause, results, help
Logic — Vanilla JavaScript (IIFE, "use strict") Tunable PARAMS block for score, combo, fever, hit windows, fall speed Chart generated from song melody + difficulty
Input — Keyboard (A S D F J K L ;) + pointer events on piano keys Multi-touch, Space = fever, Escape = pause
Audio / feel — Web Audio API (no .mp3 / .wav files) Original piano songs (pads + melody), hit spark, miss thud, intro ticks Canvas particles, hit-stop, vibration haptics
Persistence — localStorage (neonKeys.v2) Best score per song × difficulty; mute preference; migrates v1 saves
Design guidance — Sakurai-style rule docs + UI/design rules in sakurai/ and rules/ Unique hook, beginner + expert, stress/relief, immediate feedback
No framework, no bundler, no external game engine — three files, one day, one playable product.
3. The 1 Day Sprint (+ polish pass)
The sprint goal was not “a falling-notes demo.” It was: by end of day, a stranger can open the file, pick a song, play along with the music, and want one more run.
Scope locked early:
- Eight piano lanes (C D E F G A B C)
- Notes fall to a glow line; PERFECT / GREAT / GOOD / MISS
- Keyboard on desktop, tap the piano on mobile
- Original songs instead of silent charts
- Title → play → pause / result
- Light juice: particles, judgement pop, combo float, SFX
Anything that didn’t serve “hit the note, hear the song” waited.
Morning (Hours 1–3):
Hours 1–2 — Foundation
- Locked the concept: falling piano notes that ARE the melody, premium dark neon UI.
- Scaffolded the three-file app: header, HUD, stage, piano, start overlay.
- Set design tokens (pink / purple / cyan on #07070c) and mobile-safe layout (100dvh, safe areas, touch-action).
- Built eight lanes, a DOM note pool, and piano keys with pointer + keyboard input.
Hour 3 — Core loop
- Hit windows, judgement text, score / combo / accuracy HUD.
- First Web Audio piano tones so a tap had a pitch.
- First visual pass — then a full UX redo when the first layout didn’t feel like a game.
- Slowed fall speed after playtest (“this is so fast”).
- Brand: NEON KEYS wordmark + four-bar piano logo.
By lunch: you could hit notes on a glowing stage — raw, but real.
Afternoon (Hours 4–6):
Hours 4–5 — Songs, levels, and mobile
- First-run help overlay so new players see the loop before the first song.
- Mobile pass: hide A S D F J K L ; bindings, show “tap the piano,” larger keys, overlay spacing.
- Difficulty: Easy (slower, wider windows, key-guide assist), Normal, Hard (faster, tighter, extra chord notes).
- Three original tracks — Aurora (72 BPM, calm), Tide (86 BPM, rolling),
Starline (98 BPM, brighter) — each with chord pads + melody charts.
Hour 6 — Music as the product
- Chart generation from song data so notes land on the same beats as the BGM.
- Song preview on the title screen; pickup bars so the first note isn’t a surprise.
- Fever gauge, STAR notes, combo multipliers, pause / resume that keeps song time.
Afternoon turned a mechanic into a game people could hear.
The Finish Line (Hour 7-8):
- Five-miss fail state with a lives row (the song can actually end).
- Results overlay: rank (SS–C, or F on fail), score, accuracy, max combo, new best.
- Typography pass (Manrope + Syne) so the HUD read as a music game, not a dashboard.
- 3-2-1-GO countdown with intro ticks before every run.
- Best scores saved per song × difficulty; mute remembered.
Done when: open index.html → pick Aurora / Tide / Starline → Play → 3-2-1-GO → hit with the music → complete or fail → want to retry.
Polish (Aug 14):
A same-day playtest pass after the loop shipped — not new systems for their own sake, just making the fantasy clearer and the first session smoother.
- Visual identity: neon logo on header and title, glass HUD, ambient orbs, lane colors that match the keys.
- Timing feel: slower falls, wider Easy windows, assist glow on Easy so beginners aren’t lost.
- First-session teaching: How to play overlay once, then 3-2-1-GO on every start so the first note isn’t a cold hit.
- Mobile honesty: piano is the controller; keyboard legends stay on desktop only.
- Overlay spacing and safe-area padding so Play isn’t flush against the home indicator.
- Fonts swapped until titles and stats felt premium instead of generic.
- Fail clarity: five life pips, Failed + F rank, “Try again” instead of a silent miss forever.
- Audio hierarchy: song pads sit under the melody; hits spark; misses thud; fever whooshes.
Polish rule: if it didn’t make “hit the glow line with the song” more obvious or more satisfying, it didn’t ship.
4. The Roadblocks
- Timing vs. music — Early charts felt like a generic falling-block game because notes and sound were not the same piece of data.
Fix: author melody + chords as song data, generate the chart from those beats, and play the same pitches on hit.
- Speed that punished instead of taught — First fall times were too fast; playtests bounced off. Fix: raise fallMs, widen windows,
and give Easy a key-guide assist that doesn’t exist on Normal/Hard.
- Desktop keys on a phone — A S D F J K L ; is a real layout on a keyboard and nonsense under thumbs. Fix: detect touch UI,
hide key legends, and make the piano the only control.
- “Web page” vs “music game” — First UI pass looked like a dashboard. Fix: redo hierarchy
(one Play action, glass stage, logo, less chrome) against the Sakurai “one screen, one job” rules.
- Audio without assets — No time for recorded piano or licensed tracks. Fix: Web Audio oscillators, filters,
and delay to fake a soft piano + pad, with three distinct BPM/melody identities.
- Fail state missing — Endless songs with only a miss counter didn’t create risk. Fix: five lives, fail overlay,
and fever that dumps on a miss so mistakes cost something.
- Scope clock — Skins, recorded audio, and a full song catalog all wanted more hours. Capped at three procedural tracks,
three difficulties, and juice that served the hit.
5. Key Takeaways
- Ship the fantasy first. Hit the glow line → hear the note is the product; songs, fever, and ranks only exist to serve that moment.
- Music data should drive the chart. When the melody is the chart, the game feels like performance instead of a timing quiz.
- One input model per device. Desktop gets home-row keys; mobile gets a piano. Sharing the wrong control is worse than hiding a feature.
- Constraints win sprints — three files, no asset pipeline, no framework kept every hour on feel.
- Juice is feedback design: judgement text, particles, hit-stop, haptics, and a countdown — not more systems.
- Design rules earn their keep. Unique hook, beginner + expert, and “miss must hurt” turned gut feel into checks you can run mid-sprint.
- Polish is selective. Slowing the fall, adding 3-2-1-GO, and swapping fonts did more for “I’d play again” than another mechanic would have.
My final thought:
A one-day rhythm game only works if the fantasy is tiny and sharp. For NEON KEYS that fantasy was never “a platform with songs.” It was: the note reaches the glow, you press, and it sounds like the song.
Shipping three honest files beat a half-finished “proper” audio engine. The stack stayed invisible so the piano could stay loud.
NEON KEYS: tap Play. Pick a song. Watch the glow. Play along.