Hello,
I'm developping a kart game on flash, with box2D as physic engine. And for now the game works like this:
-Each client hosts a physic engine that compute the collision and so
-Every 30 ms (about) each client send their positions to the servers which send it to everybody
-When receiving the positions packet, the client update the kart's positions
My problems are:
-The collision is not centered on one machine, implying error and jerky reactions sometimes (when two kart collide)
-The kart from others do not move fluently, but in a discret way. Due to the fact that the client just update the position and do not compute the driving or so.
So I was thinking, in order to fix some problems, that I could host the physic engine directly on my server (which is implemented in java btw). And my game would look like this:
-Each player send the key pressed/released to the server
-The server update the physic world engine with it
-The server send to everybody the new positions
Problems expected from that:
-Server overflowed by computation and request, causing lag.
So what do you think? Should I change my system or just rearranged it? And with what?
Thank you for your help
I'm developping a kart game on flash, with box2D as physic engine. And for now the game works like this:
-Each client hosts a physic engine that compute the collision and so
-Every 30 ms (about) each client send their positions to the servers which send it to everybody
-When receiving the positions packet, the client update the kart's positions
My problems are:
-The collision is not centered on one machine, implying error and jerky reactions sometimes (when two kart collide)
-The kart from others do not move fluently, but in a discret way. Due to the fact that the client just update the position and do not compute the driving or so.
So I was thinking, in order to fix some problems, that I could host the physic engine directly on my server (which is implemented in java btw). And my game would look like this:
-Each player send the key pressed/released to the server
-The server update the physic world engine with it
-The server send to everybody the new positions
Problems expected from that:
-Server overflowed by computation and request, causing lag.
So what do you think? Should I change my system or just rearranged it? And with what?
Thank you for your help