I've included a readline input for the user when running node play.js. The client will be prompted to input their name for in game use. Enter any name between 1 to 3 characters. Accepted characters are a-z, A-Z, and 0-9.
I completed the stretch activity and updated the RemoteInterface.js file in the forked snake-multiplayer/src directory
Snake game is a very popular video game. It is a video game concept where the player maneuvers a dot and grows it by ‘eating’ pieces of food. As it moves and eats, it grows and the growing snake becomes an obstacle to smooth maneuvers. The goal is to grow it to become as big as possible without bumping into the side walls, or bumping into itself, upon which it dies.
This is simply a multiplayer take on the genre.
Before you can run this client, you will need to be running the server side which you can download and install from here.
The server version is a Fork of the LHL version of the game. The fork contains modifications to src/RemoteInterface.js to enable message broadcasting to clients.
Based on the repo split between snake-client and snake-multiplayer I was limited in the ability to add features at this time. Future feature goals would include:
- Implement Player score keeping within game console
- Implement Display current highest score player
- Implement continuous snake movement
- Implement difficulty selection for the server on server initialization
- Implement variable number of fruit on screen at once
- Implement point value for different fruit types
Most of these features would require editing snake-muliutplayer files, which was out of scope for this project.
- To play the game, one needs to implement a game client.
- Follow steps inside the snek server repo to run the server side.
- Run the development snake client using the
node play.js
command.
Clone from repository
git clone [email protected]:ArcaneCipher/snake-multiplayer.git
cd snake-multiplayer
# install and run via npm
npm install
npm run play
Clone from repository
git clone [email protected]:ArcaneCipher/snake-client.git
cd snake-client
node play.js
- The game will ask for your name.
- Name must be 1 to 3 characters.
- Accepted characters are a-z, A-Z, and 0-9.
This project was not built from scratch. It was inspired and started from snek (blog post). Tania Rascia is the original author.