Interpolation Patterns
by Cinder Games · in Torque Game Engine · 06/26/2006 (7:08 pm) · 1 replies
I was under the impression that interpolation occured only between ticks. However i decided to check up on it in order to solve an issue.
I noticed a pattern that didn't make sense.
.....
Tick
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Tick
Interpolate
........
This is the pattern it's taking. My FPS is ~240
What doesn't make sense to me the the end of the pattern. it ticks once, then interpolates once, the ticks again. this patter repeats. I'm pulling this information from the processtick, and interpolate tick functions of player.cc.
Can someone help me understand what's going on at the end of this pattern?
::edit::
With the same object, but having it NOT be the controlling object, i get this pattern
.....
Tick
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Tick
Interpolate
........
pretty much the same, except only 5 interpolates instead of 9.
I noticed a pattern that didn't make sense.
.....
Tick
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Tick
Interpolate
........
This is the pattern it's taking. My FPS is ~240
What doesn't make sense to me the the end of the pattern. it ticks once, then interpolates once, the ticks again. this patter repeats. I'm pulling this information from the processtick, and interpolate tick functions of player.cc.
Can someone help me understand what's going on at the end of this pattern?
::edit::
With the same object, but having it NOT be the controlling object, i get this pattern
.....
Tick
Interpolate
Interpolate
Interpolate
Interpolate
Interpolate
Tick
Interpolate
........
pretty much the same, except only 5 interpolates instead of 9.
Torque 3D Owner Stephen Zepp
This is the meat behind the concepts of client side interpolation, and what provides clients the abiltiy to use client side prediction (applying a move from the player on the client simulation before even sending it to the server), and still stay in synch with the server (and indirectly, other clients).
While we talk most of the time about objects getting one tick per cycle, that's not actually a guarantee at all--all that is truly guaranteed is that for a given cycle, every object that has a processTick() will be credited to receive a tick. Those ticks may come after a period of 5-10 (or even more) process loops, and all be applied at once.