Everyone knows this game. I just decided to write it myself.
Use arrows to change direction of the snake movement, key P
or Space
to pause and R
to reset. Use Esc
to exit.
To control the first snake use WASD
keys, to control the second one use arrows,
to the third one use tfgh
, to the fourth one use ijkl
(can be adjusted in config.ini
).
- Portals
- 3-player and 4-player mode
- game font can be changed by adding a new font to the
Font
folder and changingfont_name
field inconfig.ini
is a default texture of static snake head.
is a default texture of moving snake head.
is a default texture of dead snake head.
is a default texture of snake tail.
Hue of all the textures can be changed.
The
boost increases the length of the snake's tail and score by one.
Chance: 70%
The
boost decreases the length of the snake's tail by one.
Chance: 15%
The
boost increases the length of the snake's tail by a number from -2 to 2, the score increases by the same number
adding a number from -1 to 1.
Chance: 10%
The
boost destroys the quarter of all the walls and decreases the score by half of all destroyed walls.
Chance: 5%
Walls are obstacles for
snakes. If a snake crashes into the wall, it dies.
Portals
can teleport a snake to random portal with the same color. Used portals are moved.
Hue of portals texture can be changed.
Amount of different portals equal to amount of players (snakes).
To run the game you neet to have python, and install all the required packages.
To do it, open terminal in the project folder and enter pip install -r requirements.txt
.
Then run main.py
file.\
*(main.py
is the main file that runs the game, but it uses the console. If you don't need the console, run main.pyw
instead.)
If you want to change the game and its rules, you can just adjust different values in config.ini
.
To create a texture pack, go to Texture Packs
, create a folder and put there images with the same names as in Default
.
Then open config.ini
, and write the name of created folder in Game
section in texture_pack_name
instead of Default
.
prof.py
writes information about execution time of functions and methods to stats.prof
.
To view this information, open terminal in Debug
folder and enter snakeviz .\stats.prof
(or python.exe -m snakeviz .\stats.prof
).
If you have ideas or questions write them on the discussions.
If you find a bug or other issue write about it on the issues.