Open huytd opened 9 years ago
Animations and physics can be done client side. Anything that is not cosmetic like the splitting action itself should be server side but the client can handle the animations.
Yes, I think this much better for server and will not affect game performance.
Physic engine should definitely not be applied on the client - that's actually one of the most important parts of the game and should be handled only by the server. Take a look at the following link, games like angry birds rely heavily on the box2d engine, which is also available in JavaScript. http://box2d-js.sourceforge.net/
Probably obvious but hit-detection needs to remain on the server-side.
I think this title makes more sense. Physics is more of the movement stuff and should always be on the server-side to guard against Inspect Element hackers, animations is more of the client-side transitions (cell growth, smoother movement, smoother eating, etc.)
I'm thinking about adding an animation engine for handling some animation (split animation,...) and for faster HitTest.
But have no idea where should we calculate the animation. On server side (more complex) or on client side (much easier? any risk?)
EDIT: Appended #134
"... noticed when you eat the "food" the transition between your current size and the next size is instantaneous. Could you add the transition of the "expansion" from your current size to the new size?"