00:00
00:00
Newgrounds Background Image Theme

sdrogotime99 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

PUN2 Experiments On Lockstepping

Share Collapse

Author Comments

Turns out you can use Photon Networking for free, to add multiplayer functionality. Tho is kind of sloopy, so I tried working on the concept of lockstepping using PUN2.


The discrete simulation and DPhysics tabs explore this "lockstepping" idea. Where both users are in sync essentially. Stepping together. As they will only apply imput via the network to prevent mismatch in the local simulations. Tho this means Unity physics are out the window (As they vary in their calculation due to the system differences). This is used in games like Starcraft to not be sending an insane amount of data across the internet as too many objects move too much.


Instantiation tab uses the standard PUN2 functionality. Very much what causes the FPS Lag/Teleportation sort of thing in FPS games and others. You probably need to open 2 tabs to check this multiplayer lag differences.


The lag is because of the stepping. Depending on how fast messages get across the network how fast the physics can be simulated. I made a new implementation using Remote Procedure Calls. They are more efficient than Changing Room Properties. And so, you are able to get better stepping performance. Tho it should be limited to a reasonable game speed. This stepping can be previewed by clicking on the RPCframe#, or the RoomPropertiesFrame#

Log in / sign up to vote & review!

Credits & Info

Views
936
Votes
74
Score
2.84 / 5.00

Uploaded
Dec 13, 2018
9:24 PM EST