Skip to content

The Snake game is implemented using the SDL2 and Dear ImGui libraries.

Notifications You must be signed in to change notification settings

cah9xddd/snake2d_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake2D_Game

Snake game in neon style, with 2 types of food:

  • Normal food : Increasing your snake size.
  • Reverse food : Swapping the head and tail of a snake to reverse its direction of movement.

You will need

Basic Build Instructions (For VisualStudio)

  1. Clone this repo to your folder with git clone https://github.com/cah9xddd/snake2d_game.git
  2. Run CMake as follows: ⚠️ Do not forget to replace [path_to_vcpkg] with the actual path to vcpkg on your machine!
cmake -Bbuild -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=[path_to_vcpkg]/scripts/buildsystems/vcpkg.cmake
  1. Open the generated solution file in Visual Studio:

    • Navigate to the "build" directory in File Explorer.
    • Double-click on the snake_game.sln file to open it in Visual Studio.
  2. Build the project:

    • Once the solution is open in Visual Studio, select the desired build configuration (e.g., Debug or Release) from the toolbar.
    • Click on the "Build" menu and then select "Build Solution" to compile the project.
    • Alternatively, you can use the keyboard shortcut Ctrl Shift B to build the solution.
  3. Run the game:

    • After the build process completes successfully, you can run the game executable from the output directory.
    • The executable file is typically located in the "build" directory or a subdirectory within it, depending on your project configuration.

About

The Snake game is implemented using the SDL2 and Dear ImGui libraries.

Resources

Stars

Watchers

Forks