I always thought it would be fun to play pac man against other people remotely.
What it does
Players load into the game (max 5) and start in defined places on the map. Everyone THINKS they are Pac Man, but on other people's screens they show up as a ghost. The server keeps track of where everyone is so no one can cheat. It calculates collisions with walls and other players.
Players accumulate power by picking up standard pellets. When they hit a power pellet they can use their power to attack other players. If you run into another player their power is subtracted from each other. If a player drops below zero they're dead and the other player continues on until their is only one!
How we built it
The gui is written in HTML. A Golang server maintains the state of the match and sends out frames with all of the players' moves to all players simultaneously. The game server calculates all collisions/damage. The players only send movement.
Challenges we ran into
We hadn't done websockets or canvas before with performance in mind. Calculating collisions is a 'solved problem' but we wanted to explore techniques ourselves.
Accomplishments that we're proud of
Communications work, rendering of players works, eye movements of the ghosts track direction of movement.
What we learned
A lot about websockets and canvas.
What's next for Net Pac Royale
We're going to continue to work on this for fun.