app snakesss

The classic (2-player) snake game

3 releases

0.1.2 Jun 20, 2022
0.1.1 Jun 19, 2022
0.1.0 Jun 19, 2022

#669 in Games

MIT license

765KB
424 lines

Simple 2-player snake game

Game made with a piston engine.

Note: It's really hard to capture a fun animation when playing solo a two-player game.

About

This was done as an educational challenge as a one-day hackathon. After watching this video, which sets up the coding ground for the basic snake game.

I wish I had more time to implement multiple gamestates (like MainMenu, ScoreScreen...), but it is what it is.

Enjoy!

Movement

  • Red player: arrow keys
  • Blue player: WASD keys

Every melon consumed lengthens the snake.

  • How to win: Avoid losing!
  • How to lose: Hit the enemy snake!
  • How to make peace: Frontal collision with the other snake (ain't these snakes peculiar creatures...)

General strategy:

  • The bigger your snake becomes, the higher the chance your opponent will not be able to avoid your elooongated snake body.

How to run

$ cargo run    # Should do the trick (from the repo root directory)

Dependencies

~19–28MB
~443K SLoC