I am in the process of completing a Java (jbox2d) based physics puzzle game. Whenever a puzzle is successfully solved depending upon the time required the data i sent from the client side to the server side.How can i make sure this data is not being tampered with .. or what should i do so that the game score cannon be hacked ??

can I do something like take the co-ordinates of the point where he has suppose 'shot' the cannon and then run the simulation again on the server side for exactly the same situation without using the graphics and all and updating the game world at super high speed .. This way i can check what happens on the server side rather than on the client-side.

Is physic engines deterministic? I noticed that at my game Shapetronic It totally random where the game object bounce after initial drop. Initial drop is allways at same position so as player. My game use phys2d so it may be different than box2d. But I would't trust that two simulations are identic even if starting variables would be.

Is physic engines deterministic? I noticed that at my game Shapetronic It totally random where the game object bounce after initial drop. Initial drop is allways at same position so as player. My game use phys2d so it may be different than box2d. But I would't trust that two simulations are identic even if starting variables would be.

umm .. i m not sure about that haven't used it so i dont know .. What do you do then to protect your game from client side hacks ?

Is physic engines deterministic? I noticed that at my game Shapetronic It totally random where the game object bounce after initial drop. Initial drop is allways at same position so as player. My game use phys2d so it may be different than box2d. But I would't trust that two simulations are identic even if starting variables would be.

Off-topic, but are you using fixed time steps for the physics engine updates? If not, then that's the cause of your 'random' behaviour.Simon

Is physic engines deterministic? I noticed that at my game Shapetronic It totally random where the game object bounce after initial drop. Initial drop is allways at same position so as player. My game use phys2d so it may be different than box2d. But I would't trust that two simulations are identic even if starting variables would be.

Off-topic, but are you using fixed time steps for the physics engine updates? If not, then that's the cause of your 'random' behaviour.Simon

As others stated, you can't. If you want to prevent script kiddies from just sending some scores, send them encrypted (even a simple xor encryption should be sufficient - maybe make this a handshake process with sending a one-time key by the server). Also obfuscate your client code.

That's about it - you can't do anything more (at least without your legitimate customers getting pissed - what the bigger game studios don't seem to get...). As soon as there is a capable hacker interested in your game, it will get hacked. But by then your game is probably quite successful anyway.

For the physics simulation, as long as you are using your own algorithms, you can afaik force strict math.

No. Abstract the simulation to take a set of parameters reflecting the players action. Let the client send this to write a high score. Copy over this values in a kind of queue and close the connection to the client - you don't need to wait for the simulation to be finished (if you want to show the score table to the player, just use the locally calculated result on the client). Then have a single thread with the physics calculation working on this queue in a loop.

No. Abstract the simulation to take a set of parameters reflecting the players action. Let the client send this to write a high score. Copy over this values in a kind of queue and close the connection to the client - you don't need to wait for the simulation to be finished (if you want to show the score table to the player, just use the locally calculated result on the client). Then have a single thread with the physics calculation working on this queue in a loop.

But what in cases when the user cannot go to the next level until he has successfully finished the current level ?

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org