Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.62 KB

File metadata and controls

68 lines (43 loc) · 1.62 KB

Snake

A minimal Snake game!

Screenshot 2025-08-06 150850

Installation

You can either:

  • Download the executable file from itch.io, or
  • Build the project yourself.

Build the Project

To build the project locally, first download it from GitHub or clone the repo:

git clone https://github.com/pepperjackdev/snake

Using Convenience Methods

A utility Makefile is provided to simplify the build process:

  • make g – generates the build scripts
  • make b – builds the sources
  • make r – runs the game

Each target depends on the preceding one. If you just want to run the game, use:

make r

For each of these targets, there's a WebAssembly counterpart using Emscripten:

  • make eg – generates build scripts for WebAssembly
  • make eb – builds for WebAssembly
  • make er – runs the WebAssembly version

Using CMake

You can also build the project using CMake directly:

  1. Open a terminal in the local repository

  2. Create a new directory for the build (e.g., mkdir build)

  3. Move into that directory:

    cd build
  4. Generate the build scripts with:

    cmake ..
  5. Build the sources using your preferred build system (e.g., if you're using Ninja):

    ninja

Playing the game

The game is extremely lazily developed minimal. Just run it and start playing by moving the snake with your WASD keys. To replay, simply close and re-run the game.