sonic_soccer_lcd

๐Ÿ‘Ÿ Sonic Soccer LCD (Flutter Recreation)

A faithful Flutter recreation of the classic 2003 Sega/McDonaldโ€™s LCD Handheld games โ€” specifically a highly addictive custom Sonic Soccer edition!

Built entirely with pure Flutter frontend architecture, this project meticulously replicates the physical aesthetic, visual constraints, synthetic audio, and responsive gameplay of early 2000s promotional fast-food handhelds.

Flutter Dart Platform License


๐Ÿ•น๏ธ Play the Web Demo: sonic-soccer-lcd.vercel.app


๐Ÿ“บ Preview

The game renders a 3D-styled plastic console shell with a beautiful backlit glossy sticker background, matching physical hardware styles!

True LCD Rendering โ€” The LCD segments behave identically to real physical hardware:


๐ŸŽฎ Gameplay

Defend against incoming soccer balls! Balls spawn at the top and drop vertically towards the bottom of the screen. Move Sonic horizontally to catch (save) the balls before they reach the goal line!

โŒจ๏ธ Keyboard Controls

Key(s) Action
โ† ย /ย  A Move Sonic left
โ†’ ย /ย  D Move Sonic right
1 Start / restart Game A (Max 3 balls, normal pace)
2 Start / restart Game B (Max 4 balls, fast pace)
Enter ย /ย  Space Confirm โ€” start game from menu; return to menu
Esc Menu โ€” abort current game and return to title

๐Ÿ–ฑ๏ธ On-Screen Buttons

Button Action
โ€น โ€บ Move left/right (instant onTapDown triggered for mobile/mouse)
GAME A Start Game A
GAME B Start Game B
START Start game or return to menu

Rules

โšก Super Sonic Boost

Every 50 points, the game enters a brief Super Sonic Boost State:


โœจ Features

๐ŸŽจ 5 Modular Shell Themes

Inspired by the multi-colored McDonaldโ€™s Happy Meal Sega line, you can dynamically hot-swap the color of your virtual device. Tap the circular swatches at the top of the interface:

  1. ๐Ÿ”ต Sonic Blue (Navy casing + Red buttons)
  2. ๐ŸŸก Tails Yellow (Bright Yellow casing + Red buttons)
  3. ๐Ÿ”ด Knuckles Red (Crimson casing + Blue buttons)
  4. โšซ Shadow Black (Dark Slate casing + Red buttons)
  5. ๐ŸŸข Emerald Green (Forest Green casing + Red buttons)

๐Ÿ”Š 16-bit Synthesized Audio

Uses Web Audio API (via dart:js_interop) and Windows Kernel Beep API (kernel32.dll) to generate native retro frequency beeps dynamically on the device. No .mp3 files are used in this repository!


๐Ÿ—‚ Project Structure

lib/
โ”œโ”€โ”€ main.dart                 # App entry โ€” ChangeNotifierProvider root
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ logic/
โ”‚   โ”‚   โ””โ”€โ”€ game_logic.dart           # GameLogic (ChangeNotifier), spawn mechanics
โ”‚   โ”œโ”€โ”€ ui/
โ”‚   โ”‚   โ””โ”€โ”€ sonic_soccer_screen.dart  # Full UI, Shell styling, rendering stack
โ”‚   โ””โ”€โ”€ audio/
โ”‚       โ”œโ”€โ”€ audio_service.dart        # Conditional export bridge (Native vs Web)
โ”‚       โ”œโ”€โ”€ audio_service_stub.dart   # Web-compatible Audio Synthesizer (dart:js_interop)
โ”‚       โ””โ”€โ”€ audio_service_native.dart # Desktop-friendly kernel32.dll wrapper

๐Ÿš€ Getting Started

Prerequisites

Web Deployment (Vercel)

If youโ€™re looking to run this on Vercel with the build.sh script included in the codebase:

  1. Ensure your framework preset on Vercel is set to Other.
  2. Build command: bash build.sh
  3. Output Directory: build/web
  4. Install Command: Make this inherently block (e.g., echo "skip").

๐Ÿ™ Credits

๐Ÿ“„ License

MIT โ€” see LICENSE for details.