Neon Tiles - Twinkle Twinkle Little Star

By Just Sparrow

Just Sparrow

0 subscribers

6 viewsยท2h ago

๐ŸŽน Neon Tiles โ€” Twinkle Twinkle Little Star

A neon-styled 4-lane rhythm game built around the classic "Twinkle Twinkle Little Star" melody. Tap the falling tiles in time, or hold them down for sustained notes. Cyberpunk visuals with a cyanโ†’magenta gradient palette and the Orbitron typeface give it a retro-futuristic arcade feel.

๐ŸŽฎ How to Play

  • Tap / Click โ€” Tap tiles on mobile, or click them with the mouse on desktop.
  • Keyboard โ€” Use D F J K for the four lanes (left โ†’ right).
  • Hold notes โ€” For taller tiles (half notes), keep the key/finger pressed until the tile clears.
  • Pause โ€” Space or P
  • Mute / Unmute โ€” M
  • Quick start / restart โ€” Press J while any overlay is showing.

โœจ Features

๐ŸŽต Real Melody, Real Pitch

  • Plays through all six lines of "Twinkle Twinkle Little Star" per cycle, in C major.
  • Mix of 1-beat tap tiles (quarter notes) and 2-beat hold tiles (half notes at phrase ends) for natural musical phrasing.
  • Each note plays at its actual pitch โ€” you're literally performing the song, not hitting random tones.
  • Hold tiles produce a sustained tone that rings until you release, with crisp gated envelopes for taps.

๐Ÿš€ Progressive Difficulty

  • BPM increases by +15 each cycle (60 โ†’ 75 โ†’ 90 โ†’ 105...), so the longer you survive, the faster the tiles fall.
  • The melody is also transposed up by a whole step (2 semitones) every cycle, raising the key as the tempo climbs โ€” fresh tonal challenge on each loop.

๐ŸŽจ Polished Neon Visuals

  • Hand-tuned per-lane colors along a cyan โ†’ blue โ†’ purple โ†’ magenta gradient that matches the logo.
  • Glowing tube borders, soft outer halos, and scanline textures only inside the active press zone so the tappable area is instantly readable on hold tiles.
  • Animated "neon tile" START button that physically slides down the board into the game on press โ€” no jarring screen transitions.
  • Score-burst flash animation on every successful hit.

๐Ÿง  Smart Lane Distribution

  • Lanes are picked dynamically rather than randomly: the algorithm avoids consecutive same-lane spawns and balances left vs. right side usage, so the gameplay always feels fair and varied.

๐ŸŽฏ Forgiving Hold Timing

  • Hold tiles only require 75% of the full duration โ€” releasing slightly early still counts. This was a deliberate choice to reward feel over frame-perfect precision.
  • The hold-progress fill uses a soft gradient fade at its top edge instead of a hard line, so there's no visible pass/fail boundary to fixate on.

๐ŸŽผ Combo & Scoring

  • 10 points per beat cleared (so a 2-beat hold = 20).
  • +50 bonus every 10-tile combo, with a sparkly chime cue.
  • High score saved locally via localStorage and shown on the start and game-over screens.

๐Ÿ“ฑ Mobile-First Input

  • Multi-touch support โ€” different fingers on different lanes are tracked independently via touch.identifier.
  • touch-action: none and user-scalable=no to prevent scrolling/zooming during play.
  • Viewport sized in vw units (9:16 portrait, 177.78vw tall) so it scales perfectly across phone screens.
  • Mouse-up listener attached to window so releases register even if the cursor leaves the canvas.

๐Ÿ› ๏ธ Tech Stack

  • Pure HTML / CSS / JavaScript โ€” zero dependencies, zero build step.
  • HTML5 Canvas for the 360ร—640 game board with hand-rolled rounded-rectangle drawing and gradient fills.
  • Web Audio API with OscillatorNode for real-time tone synthesis โ€” square wave fundamental + octave overtone, with separate gate, bell, and sustain envelope shapes.
  • Google Fonts (Orbitron) for the futuristic display type.
  • localStorage for persistent high score.
  • Single self-contained .html file โ€” drop it anywhere, open in a browser, and play.

๐Ÿ’ก Things to Try

  • See if you can survive past cycle 3 (BPM 105+, key transposed up a minor third).
  • Chain a perfect run for combo bonuses โ€” every 10 hits stacks +50.
  • Try it on mobile with two thumbs vs. desktop with D/F/J/K โ€” different muscle memory entirely.

Loading comments...

Other Codes

No other codes yet