/snek

A playable snake game based on LovyanGFX simulator

Primary LanguageC++MIT LicenseMIT

Snek

One tiny snake game demo using LovyanGFX SDL simulator. Decoupling the Render Engine, Keyboard Input and GameState.

Thanks for Forairaaaaa provided support.

snek game snek game start snek game over
Snek Game Demo Snek Game Start Snek Game Over

Prerequisite

  • Ubuntu 20.04 or higher
  • CMake
  • Clang or GNU build toolchain
  • SDL2
sudo apt-get update
sudo apt-get install -y build-essential libsdl2-dev

Usage

git clone https://github.com/HangX-Ma/snek.git
cd snek && git submodule update --init --recursive
cmake -B build
cmake --build build -j$(nproc)
# run the game!
./build/snek

Control the snek movement using arrow key ↑, ↓ ← and →. Restart the game by pressing and holding down on →.

License

MIT License