☀️ Sun Rider for M5Stack Cardputer ☀️
A 2D physics-based side-scrolling driving game with procedurally generated terrain.
-
An alien has depleted his magic goo fuel, and now has to use petrol like a real man. Unfortunately the fumes got the best of him and now he's on an endless voyage to get sober.🌌
-
Available in M5Burner and M5Launcher!
Features
Gameplay & Controls ⌨️
- Objective: Drive as far as possible without crashing.
- Controls (Default Keyboard):
Space: Accelerate
A: Lean Left
D: Lean Right
- Menus:
Up Arrow: Navigate Up
Down Arrow: Navigate Down
Left Arrow: Decrease Value (in Options)
Right Arrow: Increase Value (in Options)
Space: Select / Confirm
Esc: Back (from Options)
🛠️ Building & Installation
This project is designed for the M5Stack Cardputer.
- Prerequisites:
- Clone the Repository:
git clone https://github.com/Treblewolf/M5Cardputer-Sun-Rider.git
cd M5Cardputer-Sun-Rider
- ⚡ Build & Upload:
- Arduino IDE:
- Open the
.ino file, select the correct M5Stack Cardputer board from the Tools menu, go to Sketch and Export Compiled Binary
- Copy the compiled
.bin file onto SD card and run through M5Launcher
💡 Technical Highlights
- Vec2D Struct: Custom 2D vector implementation for physics calculations.
- State Machine: Simple
enum GameState manages game flow.
- Scrolling Options Menu: Handles more options than fit on the screen.
- Smooth Camera: Toggable camera smoothing for player following. 🎥
- Color Fading/Blending: Helper functions for visual effects.
- Sprite Rendering: Uses
pushImageRotateZoomWithAA for anti-aliased rotated sprites.
- Background Management: Intelligent wrapping and resetting of background elements.
🙌Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
📄 License
Distributed under the MIT License. See LICENSE file for more information.