Skip to content

o3wiz/snake-cpp

Repository files navigation

Snake Game

Simple classic Snake game implementation using the raylib library.

Screenshot

Screenshot 2024-06-16 201116

Getting Started

Prerequisites

  • C++ compiler (MSVC, gcc, clang) [c++20]
  • raylib library

Build Instructions

  1. Clone:

    git clone --recurse-submodules -j8 https://github.com/o3wiz/snake-cpp.git
  2. Compile the project and run the game:

    cmake -B build
    cmake --build build -j8
  3. Play ./build/SnakeGame or ./build/Debug/SnakeGame or ./build/Release/SnakeGame

Gameplay

In this game, you control a snake that grows in length each time it eats food. The objective is to keep growing the snake without colliding with its own body or the walls.

Controls

  • Up | w | k:
    Moves snake's head upwards
  • Right | d | l:
    Moves snake's head to the right
  • Down | s | j:
    Moves snake's head downwards
  • Left | a | h:
    Moves snake's head to the left

Scoring

  • Each time the snake eat an apple the score increases by 1.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors