Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualKnolanCross

Posted 21 November 2012 - 09:30 AM

Not only that (creating loads of useless threads), sometimes you have small interpolated actions based on last time difference.
For instance, on a general approach, you have the movement calculated in something similar to (this example is a client server game I coded for college some time ago):

[source lang="python"] def calcNewPosition(self, movespeed, timeInterval, ang): posTuple = self.getPos() x = posTuple[0] + (movespeed * (timeInterval) * sin(radians(ang))) y = posTuple[1] + (movespeed * (timeInterval) * cos(radians(ang))) z = posTuple[2] return (x, y, z)[/source]
If the client can "freeze" the server, it may make the time inverval vary so much that it will end up "teleporting" in the game. If this happens, the collision calculation won't be effective and the character may end up being able to cross walls, fly or just create some unhandled situation that may end up with a crash.

#1KnolanCross

Posted 21 November 2012 - 09:27 AM

Not only that, sometimes you have small interpolated actions based on last time difference.
For instance, on a general approach, you have the movement calculated in something similar to (this example is a client server game I coded for college some time ago):

[source lang="python"] def calcNewPosition(self, movespeed, timeInterval, ang): posTuple = self.getPos() x = posTuple[0] + (movespeed * (timeInterval) * sin(radians(ang))) y = posTuple[1] + (movespeed * (timeInterval) * cos(radians(ang))) z = posTuple[2] return (x, y, z)[/source]
If the client can "freeze" the server, it may make the time inverval vary so much that it will end up "teleporting" in the game. If this happens, the collision calculation won't be effective and the character may end up being able to cross walls, fly or just create some unhandled situation that may end up with a crash.

PARTNERS