Skip to content

unlimish/tau_dash

Repository files navigation

TAU Dash: Tama Art University Campus Map & Landmark Hunt Game

An 8-bit retro-style map exploration and landmark hunting game built for the Rabbit Pie board (Raspberry Pi Pico/RP2040, 128x64 Mono OLED, joystick, buttons, and I2S DAC audio).

The game renders a vector map of Tama Art University Hachioji Campus using real OpenStreetMap (OSM) data. While playing, a custom-synthesized swing BGM loops in the background on the second core using the Mozzi audio library, setting a cozy yet hectic mood as you race against the clock to complete your campus schedule!


📸 Screenshots

Gameplay & Compass Navigation Game Over & Total Distance Volume Adjustment HUD
Gameplay Map Game Over Volume Adjust

🎮 Controls

Inputs Action Function
Joystick Tilt Scroll Map: Move camera with smooth snappier acceleration and inertia sliding.
SW0 (Button 1) Hold + Joystick X Rotate Map: Turn the map direction. Camera inertia stops while rotating.
SW1 (Button 2) Tap (Release)
Hold + Joystick Y
Reset View: Teleport back to campus center (-650, 300) and reset rotation. (Plays sweep sound)
Volume HUD: Toggles volume adjust meter (0-10) by moving joystick Up/Down. (Plays blips)
SW2 (Button 3) Press Zoom Cycle: Switches map magnification between 0.5x1.0x1.8x. (Plays blip)
SW3 (Button 4) Press Skip Target: Force skip the current target to get a new random landmark. (Incurs a -5.0s penalty and plays warning buzz!)

💡 Gameplay Tips:

  • The campus is vast! Switch to 0.5x zoom out to locate targets, and zoom in to 1.8x for precise landmark approach.
  • The joystick features realistic friction and sliding mechanics. Let go of the stick to slide smoothly to a stop!

🏆 Game Rules

  1. Locate Target Landmarks
    • The HUD on the top displays your next target (e.g. GO TO: Library).
    • If the target is off-screen, a pointer guide arrow will blink at the screen border, directing you towards it. Follow the arrow!
  2. Player Crosshair
    • The crosshair in the center represents your player coordinate. The map scrolls under you as you move.
  3. Proximity Alerts
    • Moving close to any major building (e.g. Sekaido, Library, Lecture Hall, Canteens, Club Bldg, Liberal Arts) displays a "Near: [Building Name]" popup box.
  4. Collect Score & Add Bonus Time
    • Arriving at the target building centroid (within 15.0 meters) triggers a 3-note victory chime and awards a point (S: [Score]).
    • Reaching a target awards a time extension that decays exponentially as your score increases, down to a tight minimum of 1.5 seconds: $$\text{Time Bonus} = 1.5 + 8.5 \times e^{-0.22 \times \text{score}}$$
  5. Countdown & Game Over
    • You start with a 45.0 seconds countdown. The timer decreases by 0.1s precision.
    • When the timer falls below 5.0 seconds, a retro warning tick sound beeps on every second boundary.
    • Reaching 0.0s triggers Game Over, stopping the BGM and playing a sad 8-bit sliding down sound.
    • Press SW1 to restart the game from scratch!

🛠️ Pin Definition & Hardware Spec

  • Input Pins:
    • Joystick X-Axis: GP26 (A0)
    • Joystick Y-Axis: GP27 (A1)
    • SW0 (Rotation Mode): GP19
    • SW1 (Reset / Volume): GP18
    • SW2 (Zoom Cycle): GP17
    • SW3 (Skip Target): GP16
  • SSD1306 Monochrome OLED:
    • Resolution: 128x64 pixels
    • Bus: Hardware I2C (SDA = GP4, SCL = GP5)
  • Mozzi Audio Output (I2S DAC):
    • Pins: BCK = GP20, WS = GP21, DATA = GP22
    • Noise Suppression: GP23 is driven HIGH to configure the power IC to PWM mode.

🚀 How to Build & Flash

1. Open in Arduino IDE

  1. Open the Arduino IDE on your Mac.
  2. Select File -> Open... and load tau_dash.ino.

2. Board Configuration

Make sure the Raspberry Pi Pico/RP2040 board package by Earle F. Philhower, III is installed and selected:

  • Tools -> Board -> Raspberry Pi Pico/RP2040 -> Raspberry Pi Pico
  • Tools -> CPU Speed -> 133 MHz

3. Required Libraries

Install the following libraries using Sketch -> Include Library -> Manage Libraries...:

  • U8g2 (OLED Graphics)
  • Mozzi (Audio synthesis)

4. Upload

  1. Connect your Rabbit Pie board via USB.
  2. Select the serial port in Tools -> Port.
  3. Click the Upload button to build and flash!

📄 License

This project is open-sourced under the MIT License.

About

A retro 8-bit campus navigation & landmark hunt game for the Rabbit Pie (RP2040) board. Features smooth 2D rendering of Tama Art University using real OpenStreetMap data, delta-time countdown mechanics, and dual-core Mozzi audio synthesis.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors