Skip to main content
strict warning: Only variables should be passed by reference in /www/htdocs/davidc-live/modules/book/book.module on line 560.

Snaxe

September 19, 2011 by davidc

This is a simple multiplayer version of the classic Snake game, developed in 16 hours for the Überall video game party. It features network play, with mobile phone or laptop controllers, for 2-8 players per game. It can also be played with up to 4 players on the local keyboard, or with a combination of both network and local players.

Features

  • 2-8 players per game (up to four of which can be on the local keyboard).
  • Queue of players for the next game.
  • Countdown toward the next game, depending on number of players queued.
  • Server runs unattended in a loop.
  • Rabbits = +20 points and your snake grows.
  • Potion = invulnerability for 20 seconds.
  • Cheetah = double speed for 15 moves.
  • Bones = a dead snake. Touching is death.

Play Now

Assuming you have Java installed, you can play Snaxe by simply running this WebStart file:

Play Snaxe Now

The game will warn you that it is unable to connect to the swarm server, but you can play in local-only mode using the following keys:

Function Player 1 Player 2 Player 3 Player 4
Join Queue Q U DEL NumPad 7
Leave Queue Q O END NumPad 9
Move Up W I Arrow Up NumPad 8
Move Left A J Arrow Left NumPad 4
Move Down S K Arrow Down NumPad 5
Move Right D L Arrow Right NumPad 6
Skip Countdown F12
Toggle Fullscreen ALT+ENTER

For further information, read the instructions.

Offline Play

To play without WebStart, download the jars from the Snaxe directory. Extract the appropriate natives jar (e.g. unzip natives-win32.jar), then run java -jar snaxe.jar.

Network Play

To play with multiple controllers over a network, you'll need the swarm server running. You can download this from GitHub. You will also need to install Python and the Python packages Distribute, Tornado and TornadIO. All of these will work fine on Windows as well as Linux.

Once everything is installed, change into the snaxe directory and run python swarmserver.py. Clients can now point their web browser to your IP address on port 8001.

If you want to change the web port from the default of 8001, you will need to change it in both swarmserver.py (down the bottom, socket_io_port) and in the client (static/controller/input.js, at the top of the startSocket method). Restart the server if you do this.

Source Code

The source code is available here.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Development

You can read about the development process on my blog:

Postmortem

The development went very smoothly, though I would have liked more time to add more features to make the game rather more unique.

Unfortunately, at the party, I was given a low power handheld DLP projector, so it was pretty near impossible to see the game. And those people that did try it on my laptop complained of a lack of responsiveness in the mobile phone controller interface.

Still, it wasn't an entirely wasted experience; I've refreshed my knowledge of Slick and built a few more useful library classes.

AttachmentSize
snaxe-thumb.png2.46 KB

Comments

People say that traveling is

April 17, 2014 by AimeeV., 1 week 2 hours ago
Comment: 101

People say that traveling is a very good stress remover. Indeed! for it can help you forget your crazy schedule at work.And widen you knowledge as we as your perspective. By the way enlisting the services of a sleep assistant may seem odd at first, but business travelers should give it a chance. Getting to bed on time can give them the advantage they need. Learn more