Saturday, October 15, 2022
HomeGame DevelopmentOpen sourced a place sync demo by my implementation of GGPO with...

Open sourced a place sync demo by my implementation of GGPO with backend assist – Cocos Creator


Hello there, I’ve lately tried porting the well-known GGPO(GitHub – pond3r/ggpo: Good Sport, Peace Out Rollback Community SDK) as a multiplayer enter sync answer and made a demo by CocosCreator v2.2.1 for it GitHub – genxium/DelayNoMore: A demo repo for GGPO impressed however websocket primarily based motion sync strategy..

On account of not being a fulltime recreation dev my useful resource is restricted and thus the demo seems ugly by far. Nonetheless, the answer actually works nicely and I’d prefer to make all of it open sourced in order that if anybody occurs to be fixing the same drawback at an earlier stage or wants a PoC to proceed, he/she will be able to take my efforts without spending a dime.

Try the demo video right here https://pan.baidu.com/s/1aM6e8IWaJszFCYAsRjt19g?pwd=z02c. The video primarily exhibits the next characteristic (but I’m not shocked in the event that they’re not apparent): when a participant didn’t have its enter arrived on the backend in time (e.g. attributable to native lag, community delay or reconnection), backend forces affirmation of a prediction of its personal and sends the confirmed enter collectively w/ a reference render body to that participant.

The event continues to be ongoing, there’re a number of apparent points with the present model and any PR is welcome.

  • Backend calculation “player-barrier-collision” isn’t but in sync with frontend calculation, it simply roughly works now so within the video demo there’re nonetheless some intermittent teleportation.
  • Frontend is chasing round 10 unmatched renderFrames per tick (60 ticks per second by default), more often than not it is a small calc effort however in uncommon circumstances I observed lag induced by this, may need to make the chasing extra heuristic.
  • And some other problem you would possibly discover in runtime or the codes.


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments