nibbler [42 project]
A Snake implementation with multiples graphical interfaces
Nibbler is only available on OSX. To install it, run make install command
git clone https://github.com/tnicolas42/nibbler
cd nibbler
make install
Then compile the project
make -j8
make -j8 DEBUG=1 # to compile in debug mode
make help # get info about make commands
Run the project:
./nibbler
You have a snake that move on a board. You can change his direction. If you hit a border or a snake, you loose.
In singleplayer, the goal is to have the longest snake. To do that, you can eat some food (red blocs). The best score is automatically saved.
In multiplayer, the goal is to survive. You can dodge the other snakes and block them.
In addition to the food, you have some bonus (yellow blocs). When you eat a bonus, your queue change to yellow (more bonus you have, more your queue is yellow). When you use your bonus, you put walls behind you (as much as the number of bonuses amassed). The walls disappear after some time (change the time in settings)
r
-> restart gamespace
-> play/pause123
-> change GUI1
-> 2D: SDL22
-> 2D: SFML3
-> 3D: SDL2 & OpenGL 4
arrow
-> change the snake directionright shift
-> put wall behind you (if you have some bonus)
available only in multiplayer mode (see settings)
wasd
-> change the snake directionleft shift
-> put wall behind you (if you have some bonus)
available only in singleplayer mode
wasd
-> move cameraeq
-> move up / downleft shift
-> increase moving speedmouse moving
-> change view direction
Feel free to change game settings in assets/settings.json.
To see the total list of bonus with description:
./nibbler --settings
In the file, you can configure:
- Board size
- Starting snake size & speed
- Nubmer of players
- Number and strength of AI
- Number of foods & bonus on the board
- Enable exit border mode
- Starting gui & sound libs
- Sound & music level
- Sound & music sources
- FPS
- Window size
- ...
You have more than 25 parameters to discover !