Skip to content

AndrewCarterUK/PHPSnake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Snake

By AndrewCarterUK (Twitter)

This game was created as a rule breaking entry to the Bulgaria PHP Conference 2016 Hackathon. Joshua Thijssen assisted with the development of this entry, but also got interested enough to make his own (awesome) PHP snake game.

Screenshot

Setup

Using composer:

composer install

To enable sound effects, please install the modplayer extension. The project has an installation tutorial and could be found here.

Multi Player Mode

php play.php mk

In this mode the walls are not boundaries, if you crash into the other player or yourself you will lose the whole of your snake.

The arrow keys control one of the snakes and the 'A', 'S', 'D' and 'W' keys control the other.

You have 100 seconds to play the game, the winner is the player with the longest snake at the end.

Single Player Mode

php play.php

In this mode the walls are boundaries, if you crash into the wall or your own snake the game is over.

Other Modes

The remaining two modes are possible, but not really any fun.

Single Player (Keep Alive) Mode

php play.php k

Multi Player (Death) mode

php play.php m

Run in a Docker container

docker run --rm -it -v $(pwd):/code -w /code php:cli php play.php

About

Multi-Player PHP Snake Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages