Just another minimal implementation of the snake game, this time using in Rust + SDL2.
- I tested this with
rustc 1.65.0
, so make sure you have a compatible version. - Also make sure your system has the SDL2 dev libraries.
- Clone this repo.
cargo run
it.- Enjoy!
Keybindings:
- WASD to move
- Escape to pause/unpause/restart.
- ./src/context.rs - Controls the game state and mechanics.
- ./src/renderer.rs - Draws the game state into the sdl canvas.
- ./src/main.rs - Keybindings + game loop and ticks.