A Rust-based basic pixel game engine that can compile to both WASM and to bare metal on the RP2040, using a HTML canvas or an SSD1306 for display output. The goal is to support basic 3D graphics in the future.
Features (working):
- Compiling to both WASM and RP2040
- Framebuffer
- Inputs
- Sprites
- Actor-World system
Features (not yet implemented):
- Collisions
- 3D??
- Async on the RP2040 side?
- Loading games from SD card??
- Doom port (probably only for WASM because RAM limitations, but pico could work with a little optimising) - game engine in a game engine???
? = Maybe, I'll do it if I find time
| Pi Pico pin | Connected to |
|---|---|
| GPIO 4 | SSD1306: SDA |
| GPIO 5 | SSD1306: SCL |
| 3.3V | SSD1306 |
| GND | SSD1306 |
| GPIO 6 | Up |
| GPIO 7 | Down |
| GPIO 8 | Left |
| GPIO 9 | Right |
| GPIO 10 | Jump |
| GPIO 18 | Sprint |
| GPIO 19 | Crouch |
Connect the other leg of the buttons to ground, no need for pullup resistors as we're using the pico's internal pullups.
cargo rp2040cd ./www/
npm install
npm run startrt