• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Network Physics

W

Walter Munoz

Guest
Hello there, im doing a game with box2d physics in gms and i want to add the online component...

Can someone give me some guidelines on working with physics on a online game match with GM:S ?

Txs very much 4 the help
 

Phil Strahl

Member
Physics is always tough with multiplayer syncing. My suggestion would be to have one of the players act as host that does all the physics calculations for all players and sends out the positions to the client-players. Easier said than done, of course, since this means having everything in the game to toggle between simulated or "passive", to come with solid packing of data the packages to the clients, where only instances that changed position/state should be transmitted to save bandwidth and increase speed, etc.
 
Top