Multiplayer Overhauls and Bouncy Balls


Hey all! So we spent the last two days completely redoing the multiplayer code for the game. The way it worked prior, each player's game had control of their own character and mirrored the character's actions to the other person. So Player 1 would control the Player 1 sprite, their computer would calculate all the game physics, display the results on their own computer, and then send what happens to Player 2's computer to display. Player 2 would do the same thing for the Player 2 sprite. Balls were independently controlled, without any network communication.

While this method worked fine for throwing something together the same day a game jam was ending, it also led to a lot of de-syncing between players. What we ended up doing to fix this was having all of the physics calculated by the Player 1 (the host), and every sprite then gets mirrored to Player 2's screen. This means both players and the balls are only really interacting on Player 1's computer, with Player 2 only seeing the positional changes from the interactions. One issue that we haven't fixed is choppiness if any latency happens.

The final change we did for gameplay was making balls a bit more interactive. Players now kick them around when they can't pick up any more balls. Another fun feature is the balls now can bounce against each other, which can cause some small amounts of chaos when balls knock each other around. The kicking around from the ground isn't as smooth as I'd like, but it will do for now.

Files

linux_DODGEBALL-0.9.1.zip 14 MB
May 13, 2020
windows_DODGEBALL-0.9.1.zip 13 MB
May 13, 2020

Get DODGEBALL

Leave a comment

Log in with itch.io to leave a comment.