https://github.com/sl-pirate/snake
A Multi-Player Snake game in sdl
https://github.com/sl-pirate/snake
cpp cross-platform-game game multiplayer multiplayer-game sdl sdl2 snake snake-game snake-game-2d snake-game-in-cpp wxwidgets wxwidgets-gui
Last synced: about 2 months ago
JSON representation
A Multi-Player Snake game in sdl
- Host: GitHub
- URL: https://github.com/sl-pirate/snake
- Owner: SL-Pirate
- License: gpl-3.0
- Created: 2023-01-15T18:55:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-03T12:35:57.000Z (about 2 years ago)
- Last Synced: 2025-01-16T07:56:26.441Z (4 months ago)
- Topics: cpp, cross-platform-game, game, multiplayer, multiplayer-game, sdl, sdl2, snake, snake-game, snake-game-2d, snake-game-in-cpp, wxwidgets, wxwidgets-gui
- Language: C++
- Homepage:
- Size: 25.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Multi-Player Snake game in sdl
## ScreenShots




## build dependancies
- wxWidgets
- SDL2
- SDL2_image
- SDL2_ttf
- SDL2_mixer
- cmake
- git## Building in linux
```sh
git clone github.com/SL-Pirate/snake
cd snake
mkdir build
cd build
cmake ..
make
```
### To Run the program
do `sudo chmod +x ./snake`
- This needs to be done only once!
- after this is done just execute the `snake` binary from a command line or a graphical file manager.## Building for windows
### Setting up building environment for windows1. Download and install wxWidgets from their official website
1. Add the path_to_the_root_of_your_wxWidgets_folder to your system environment variables under the name `wxWidgets`
1. Download the development packages of
- SDL2
- SDL2_image
- SDL2_ttf
- SDL2_mixer
corresponding to your compiler
1. Extract the development package of SDL2 and rename the directory as SDL2
1. Extract the development package of SDL2_image to the same folder and rename it as SDL2_image
1. Extract the development package of SDL2_image to the same folder and rename it as SDL2_ttf
1. Extract the development package of SDL2_mixer to the same folder and rename it as SDL2_mixerNow your directory should look like this
```tree
{BaseFolder}
├── SDL2
├── cmake
├── include
├── lib
etc...
.......
SDL2_image
├── cmake
├── include
├── lib
etc...
........
SDL2_ttf
├── cmake
├── include
├── lib
etc...
........
SDL2_mixer
├── cmake
├── include
├── lib
etc...
```
1. Add the path_to_the_root_of_your_SDL2_BaseFolder to your system environment variables under the name `SDL2`### Compiling
- if using `MinGW32-gcc`
```sh
git clone github.com/SL-Pirate/snake
cd snake
mkdir build
cd build
cmake .. -G "MinGW Makefiles"
make
```
- if using msvc
```sh
git clone github.com/SL-Pirate/snake
cd snake
mkdir build
cd build
cmake --build ..
```