Skip to content

CieriA/rusty-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake (Rust + SDL2)

A clean Snake clone made with Rust and SDL2.

Features

  • Classic snake mechanics
  • Score system
  • Keyboard controls

Requirements

  • Rust (stable) — install via rustup
  • SDL2 — graphics and input
  • SDL2_ttf — for rendering text (e.g., score display)

SDL2 and SDL2_ttf installation

Linux

sudo apt install llibsdl2-dev libsdl2-ttf-dev

macOS (using Homebrew)

brew install sdl2 sdl2_ttf

Windows

Use vcpkg or manually install SDL2 and SDL2_ttf developer packages. Make sure the .ddl files are in your PATH or project folder at runtime.

Building the Project

Clone the repository and build in release mode:

git clone https://github.come/{io}/rusty-tetris
cd rusty-tetris
cargo build --release

Running the game

cargo run --release

Controls

  • Arrow keys / WASD to move the snake

Development Notes

This project uses the following crates:

  • sdl2
  • rand

TO regenerate documentation locally:

cargo doc --open

License

This project is licensed under the ISC License. For more info see the LICENSE file.

About

A snake clone made with Rust and SDL2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages