#AI Nibbles Server
A game server for AI Nibbles game (clone of the classic Q-basic game).
Note: The server is an early alpha version.
- [Node.JS] (http://nodejs.org)
git clone https://github.com/MattiLehtinen/ai-nibbles-server.git
cd ai-nibbles-server
npm install
Don't mind if you get MSBUILD errors. There is an optional native compilation step with socket.io which require Visual Studio to be installed on windows but it will work fine without.
- Run Server:
npm start
- Start user interface to watch the game
- Join 2 bots to start the game
Currently you need to change configuration parameters on app.js
file.
You can use [AI Nibbles Monitor] (https://github.com/MattiLehtinen/ai-nibbles-monitor) to watch games.
See [sample node.js AI implementation] (https://github.com/MattiLehtinen/ai-nibbles-sample).
{"msg":"join", "data": {
"player": {
"name": "Will Worm"
}
}}
If new game is created, server sends:
{"msg":"create", "data":{"gameId": "442152"}
{"msg":"join", "data":{"gameId": "442152", "player": {"name": "Will Worm"}}}
Server sends for each player's join:
{"msg":"join", "data":{"gameId": "442152", "player" {...}}}
Server sends:
{"msg":"start", "data":{"players": [{name: "Will Worm"}, {"name": "Wesley Worm"}]}}
{"msg":"positions", "data":{...}}