Kevin Barthman

Senior Software Engineer
Game Developer

Project:

Multiplayer Marble Game



Multiplayer Marble Game



Level up your marble stats and play with your friends

This project was an experiment to learn Photon Unity Networking (PUN) and try to create a flexible framework for designing many different game modes and level configurations. I started off making it a survival type game, and thought it would be easy to just have the player be a sphere, or a marble. This proved to be challenging enough and I was a fan of other marble games, so I stuck with it. Ryan Bemowski helped with some of the networking fundamentals and we co-created a few aspects of it. A key problem that I found a solution for was resolving physics collisions. When two players run into each other at high speeds, each client originally calculated their own collision. However, if one client has enough latency, they would collide, bounce back, update their position to the network, and the other client would never have even calculated a contact as the other player already bounced away. This made it feel as if sometimes on collision players were immovable objects. I chose a rather simple solution: whoever calculates the collision first, they 'win' and send their collision information for both players to the other clients by simply setting the other players velocity. It is not perfect and would greatly benefit from prediction, but this is just a prototype after all.

Produced for...