Inspiration
We wanted to try our hands on a slightly more complicated game and also experiment with Websockets.
What it does
Multiplayer Pac-Man-inspired game, where one player takes the classic role of Pac-Man and the other plays as one of three ghosts. Pac-Man's goal is to eat all dots spread over the map. The ghost's goal is to lure Pac-Man into eating him after Pac-Man has collected one of his power-ups. For this the ghost has to be stealthy so he's indistinguishable from the other two AI-based ghosts.
Local multiplayer is supported with W,A,S,D and Up,Down,Left,Right controls. Online multiplayer is currently experimental and not deployed yet.
How we built it
All controls, ghost-AI and game logic in vanilla JavaScript using HTML5 canvas for rendering. Socket.io for Websocket API, jQuery for event handling and simple Python/Flask web-app.
Challenges we ran into
Collision detection on HTML5 canvas can be very tedious and inefficient.
Accomplishments that we're proud of
Produce a sound codebase of roughly 1000 lines of JavaScript. Successfully emulating the old Pac-Man's feel and look.
What we learned
Object-Oriented JavaScript can be very fun and result in beautiful code. Using build tools like Brunch becomes essential after your codebase reaches a certain size.
What's next for Hac-Man
Squash some bugs and get the Multiplayer version running reliably. Introduce more sound game sessions and (hopefully) deploy.
Log in or sign up for Devpost to join the conversation.