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

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

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

[ad_1]

Hi there, I’ve just lately tried porting the well-known GGPO(GitHub – pond3r/ggpo: Good Game, Peace Out Rollback Network 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 based mostly motion sync strategy..

Due to not being a fulltime sport dev my useful resource is proscribed and thus the demo seems to be ugly by far. However, the answer actually works properly and I’d prefer to make all of it open sourced in order that if anybody occurs to be fixing an identical drawback at an earlier stage or wants a PoC to proceed, he/she will be able to take my efforts without cost.

Check out the demo video right here https://pan.baidu.com/s/1aM6e8IWaJszFCYAsRjt19g?pwd=z02c. The video primarily exhibits the next characteristic (but I’m not stunned in the event that they’re not apparent): when a participant didn’t have its enter arrived on the backend in time (e.g. because of 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 improvement 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” just 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 seen lag induced by this, might need to make the chasing extra heuristic.
  • And every other situation you may discover in runtime or the codes.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here