Pacman_server is a project mainly written in ERLANG and SHELL, it's free.
Pacman game server
This is a game server for running multiple Pacman games. The server provides the ghosts, the client must provide Pacman by implementing the protocol described below.
Once a game is running you may visit http://servername:8080/game/ to view the game.
Please see "The Pac-Man dossier" by Jamey Pittman for a detailed description of the game.
The server is listening on port 2222. You must connect using a TCP socket. The protocol is simple text communication over this socket.
Every message must adhere to the following format:
action JSON-ENCODED-DATA
That is, a keyword with the name of the action you wish to perform, a space and then the arguments encoded as JSON. The line may or may not end in a newline. You should only send one command and then wait for a reply. If your program is not well behaved, the server will crash and your game state will be lost.
The API has the following actions:
'start' initializes a new game. The returned token must be included in all subsequent API requests for this game.
Arguments:
Returns:
Calling 'move' will move Pacman in the specified direction. After Pacman has moved, the ghosts are allowed to make their move.
Arguments:
Returns:
The map is serialized to a string made up of digits. Your client must implement it's own map data structure. The map is always a square and you will receive width of the map.
Note: Two ghosts are allowed to occupy the same space, but in the serialized map only one ghost will be included if two or more overlap.
The following objects may be found on the map:
The AI of the ghosts tries to follow the original AI as far as it is convenient to implement. The only thing you will know for sure is that the behaviour is completely deterministic.