Navigate inside the root directory and run command npm install
then npm start
to start the server.
The default port is 3000 so the server will start on http://localhost:3000
Developed as part of a team for university coursework (Web Programming course) - Original repo The objective was to develop an online multiplayer 2D browser game using strictly DOM manipulation, and without using any game engines or the HTML Canvas element.
The game runs on Node.js, using npm as a package manager (Babel for backwards compatibility, Parcel for bundling JS files together, and Socket.io for client-server communication). Players are randomly assigned either a ghost or a Pacman (probability percentage can be edited in the source code). Both types can eat "food" for points, however only Pacmen can eat the powerup pills, and once they do they are able to eat ghosts. Server is mainly acting as a relay, sending information between all the clients.
All the game logic happens on client side. 'server/index.js' bundles all javascript files together and detects a socket connection. All of the 4 main scripts in '/src' are on client side.
setup.js holds all the constants and the layout of the level
pacman.js holds all the methods to move pacman/ghost on the grid and handle player input
arena.js is used to generate a DOMGrid from the layout (from setup.js) and has a method to move the pacman (or any other character) on the grid
index.js sets up the game after importing all the other scripts