Git Product home page Git Product logo

phpsnake's Introduction

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

phpsnake's People

Contributors

andrewcarteruk avatar mikechernev avatar mrailton avatar devsdmf avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.