Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMatias Goldberg

Posted 09 February 2013 - 04:52 PM

Suppose John walks 1 meter per second and takes 2 long steps to do so. Jane also walks at a speed of 1 m/s but needs 4, shorter steps.

 

After 1 second, both John & Jane have walked 1 meter. After 2 seconds, both will have traveled 2 meters.

 

However, what happens after 0.25 seconds? John will have travelled 0m because he's still trying to do his first step. However Jane will already have travelled 0.25m because she has already taken a step, and is getting prepared to perform her second one.

 

Logic & Physics update is the same. We use interpolation in Graphics so that to the eyes (what we render) looks like John & Jane are taking the similar number of steps (and after 0.25 seconds, both John & Jane look like they traveled 0.25m). How many steps look like they're taking will depend on the rendering framerate.

 

We could do this for logic too, but it's advised not to do so. This interpolation can have undesired side effects (particularly with extreme interpolation/extrapolation values) and can induce into very rare and hard to find bugs that are triggered because it broke one of your logic's system assumptions or triggered a corner case.

What is worse, is that the probability of triggering these logic bugs depends on the speed of the CPU, so while everything works fine in your PC, the game is buggy as hell in a faster machine..... or slower ones. (Older games had these types of bugs. One game I can recall that was affected by those is Grim Fandango, there are more)

 

It also breaks determinism, which is a very desirable property. Without determinism, each run given the same input (i.e. key strokes, random seed) may yield different results, while a deterministic game will always give the same result (given the same input & after isolated all sources of undeterminism, such as user input, random seed).

Determinism is desirable because it allows you to reproduce bugs & crashes in no time (imagine trying to reproduce a bug that happens one in a thousand player matches!!)

 

Interpolating in Logic from fixed steps has almost the same effects as using variable frame rate (instead of fixed). All of this applies to Physics as well (which is the main point of Gaffer's article), but physics engines have the additional problem that simulations become unstable and the "bullet through paper" problem

 

So, in short, you could interpolate values for logic, but this doesn't mean you should. Just do it for graphics.


#5Matias Goldberg

Posted 09 February 2013 - 04:51 PM

Suppose John walks 1 meter per second and takes 2 long steps to do so. Jane also walks at a speed of 1 m/s but needs 4, shorter steps.

 

After 1 second, both John & Jane have walked 1 meter. After 2 seconds, both will have traveled 2 meters.

 

However, what happens after 0.25 seconds? John will have travelled 0m because he's still trying to do his first step. However Jane will already have travelled 0.25m because she has already taken a step, and is getting prepared to perform her second one.

 

Logic & Physics update is the same. We use interpolation in Graphics so that to the eyes (what we render) looks like John & Jane are taking the similar number of steps (and after 0.25 seconds, both John & Jane look like they traveled 0.25m). How many steps look like they're taking will depend on the rendering framerate.

 

We could do this for logic too, but it's advised not to do so. This interpolation can have undesired side effects (particularly with extreme interpolation/extrapolation values) and can induce into very rare and hard to find bugs that are triggered because it broke one of your logic's system assumptions or triggered a corner case.

What is worse, is that the probability of triggering these logic bugs depends on the speed of the CPU, so while everything works fine in your PC, the game is buggy as hell in a faster machine..... or slower ones. (Older games had these types of bugs. One game I can recall that was affected by those is Grim Fandango, there are more)

 

It also breaks determinism, which is a very desirable property. Without determinism, each run given the same input (i.e. key strokes, random seed) may yield different results, while a deterministic game will always give the same result (given the same input & isolated all sources of undeterminism, such as user input).

Determinism is desirable because it allows you to reproduce bugs & crashes in no time (imagine trying to reproduce a bug that happens one in a thousand matches!!)

 

Interpolating in Logic from fixed steps has almost the same effects as using variable frame rate (instead of fixed). All of this applies to Physics as well (which is the main point of Gaffer's article), but physics engines have the additional problem that simulations become unstable and the "bullet through paper" problem

 

So, in short, you could interpolate values for logic, but this doesn't mean you should. Just do it for graphics.


#4Matias Goldberg

Posted 09 February 2013 - 04:51 PM

Suppose John walks 1 meter per second and takes 2 long steps to do so. Jane also walks at a speed of 1 m/s but needs 4, shorter steps.

 

After 1 second, both John & Jane have walked 1 meter. After 2 seconds, both will have traveled 2 meters.

 

However, what happens after 0.25 seconds? John will have travelled 0m because he's still trying to do his first step. However Jane will already have travelled 0.25m because she has already taken a step, and is getting prepared to perform her second one.

 

Logic & Physics update is the same. We use interpolation in Graphics so that to the eyes (what we render) looks like John & Jane are taking the similar number of steps (and after 0.25 seconds, both John & Jane look like they traveled 0.25m). How many steps look like they're taking will depend on the rendering framerate.

 

We could do this for logic too, but it's advised not to do so. This interpolation can have undesired side effects (particularly with extreme interpolation/extrapolation values) and can induce into very rare and hard to find bugs that are triggered because it broke one of your logic's system assumptions or triggered a corner case.

What is worse, is that the probability of triggering these logic bugs depends on the speed of the CPU, so while everything works fine in your PC, the game is buggy as hell in a faster machine..... or slower ones. (Older games had these types of bugs. One game I can recall tgat was affected by those is Grim Fandango, there are more)

 

It also break determinism, which is a very desirable property. Without determinism, each run given the same input (i.e. key strokes, random seed) may yield different results, while a deterministic game will always give the same result (given the same input & isolated all sources of undeterminism, such as user input).

Determinism is desirable because it allows you to reproduce bugs & crashes in no time (imagine trying to reproduce a bug that happens one in a thousand matches!!)

 

Interpolating in Logic from fixed steps has almost the same effects as using variable frame rate (instead of fixed). All of this applies to Physics as well (which is the main point of Gaffer's article), but physics engines have the additional problem that simulations become unstable and the "bullet through paper" problem

 

So, in short, you could interpolate values for logic, but this doesn't mean you should. Just do it for graphics.


#3Matias Goldberg

Posted 09 February 2013 - 04:50 PM

Suppose John walks 1 meter per second and takes 2 long steps to do so. Jane also walks at a speed of 1 m/s but needs 4, shorter steps.

 

After 1 second, both John & Jane have walked 1 meter. After 2 seconds, both will have traveled 2 meters.

 

However, what happens after 0.25 seconds? John will have travelled 0m because he's still trying to do his first step. However Jane will already have travelled 0.25m because she has already taken a step, and is getting prepared to perform her second one.

 

Logic & Physics update is the same. We use interpolation in Graphics so that to the eyes (what we render) looks like John & Jane are taking the similar number of steps (and after 0.25 seconds, both John & Jane look like they traveled 0.25m). How many steps look like they're taking will depend on the rendering framerate.

 

We could do this for logic too, but it's advised not to do so. This interpolation can have undesired side effects (particularly with extreme interpolation/extrapolation values) and can induce into very rare and hard to find bugs that are triggered because it broke one of your logic's system assumptions or triggered a corner case.

What is worse, is that the probability of triggering these logic bugs depend on the speed of the CPU, so while everything works fine in your PC, the game is buggy as hell in a faster machine..... or slower ones. (Older games had these types of bugs. One game I can recall tgat was affected by those is Grim Fandango, there are more)

 

It also break determinism, which is a very desirable property. Without determinism, each run given the same input (i.e. key strokes, random seed) may yield different results, while a deterministic game will always give the same result (given the same input & isolated all sources of undeterminism, such as user input).

Determinism is desirable because it allows you to reproduce bugs & crashes in no time (imagine trying to reproduce a bug that happens one in a thousand matches!!)

 

Interpolating in Logic from fixed steps has almost the same effects as using variable frame rate (instead of fixed). All of this applies to Physics as well (which is the main point of Gaffer's article), but physics engines have the additional problem that simulations become unstable and the "bullet through paper" problem

 

So, in short, you could interpolate values for logic, but this doesn't mean you should. Just do it for graphics.


#2Matias Goldberg

Posted 09 February 2013 - 04:50 PM

Suppose John walks 1 meter per second and takes 2 long steps to do so. Jane also walks at a speed of 1 m/s but needs 4, shorter steps.

 

After 1 second, both John & Jane have walked 1 meter. After 2 seconds, both will have traveled 2 meters.

 

However, what happens after 0.25 seconds? John will have travelled 0m because he's still trying to do his first step. However Jane will have already travelled 0.25m because she has already taken a step, and is getting prepared to perform her second one.

 

Logic & Physics update is the same. We use interpolation in Graphics so that to the eyes (what we render) looks like John & Jane are taking the similar number of steps (and after 0.25 seconds, both John & Jane look like they traveled 0.25m). How many steps they look like they're taking will depend on the rendering framerate.

 

We could do this for logic too, but it's advised not to do so. This interpolation can have undesired side effects (particularly with extreme interpolation/extrapolation values) and can induce into very rare and hard to find bugs that are triggered because it broke one of your logic's system assumptions or triggered a corner case.

What is worse, is that the probability of triggering these logic bugs depend on the speed of the CPU, so while everything works fine in your PC, the game is buggy as hell in a faster machine..... or slower ones. (Older games had these types of bugs. One game I can recall tgat was affected by those is Grim Fandango, there are more)

 

It also break determinism, which is a very desirable property. Without determinism, each run given the same input (i.e. key strokes, random seed) may yield different results, while a deterministic game will always give the same result (given the same input & isolated all sources of undeterminism, such as user input).

Determinism is desirable because it allows you to reproduce bugs & crashes in no time (imagine trying to reproduce a bug that happens one in a thousand matches!!)

 

Interpolating in Logic from fixed steps has almost the same effects as using variable frame rate (instead of fixed). All of this applies to Physics as well (which is the main point of Gaffer's article), but physics engines have the additional problem that simulations become unstable and the "bullet through paper" problem

 

So, in short, you could interpolate values for logic, but this doesn't mean you should. Just do it for graphics.


#1Matias Goldberg

Posted 09 February 2013 - 04:49 PM

Suppose John walks 1 meter per second and takes 2 long steps to do so. Jane also walks at a speed of 1 m/s but needs 4, shorter steps.

 

After 1 second, both John & Jane have walked 1 meter. After 2 seconds, both will have traveled 2 meters.

 

However, what happens after 0.25 seconds? John will have travelled 0m because he's still trying to do his first step. However Jane will have already travelled 0.25m because she has already taken a step, and is getting prepared to perform her second one.

 

Logic & Physics update is the same. We use interpolation in Graphics so that to the eyes (what we render) looks like John & Jane are taking the similar number of steps (and after 0.25 seconds, both John & Jane look like they traveled 0.25m). How many steps they look like they're doing will depend on the rendering framerate.

 

We could do this for logic too, but it's advised not to do so. This interpolation can have undesired side effects (particularly with extreme interpolation/extrapolation values) and can induce into very rare and hard to find bugs that are triggered because it broke one of your logic's system assumptions or triggered a corner case.

What is worse, is that the probability of triggering these logic bugs depend on the speed of the CPU, so while everything works fine in your PC, the game is buggy as hell in a faster machine..... or slower ones. (Older games had these types of bugs. One game I can recall tgat was affected by those is Grim Fandango, there are more)

 

It also break determinism, which is a very desirable property. Without determinism, each run given the same input (i.e. key strokes, random seed) may yield different results, while a deterministic game will always give the same result (given the same input & isolated all sources of undeterminism, such as user input).

Determinism is desirable because it allows you to reproduce bugs & crashes in no time (imagine trying to reproduce a bug that happens one in a thousand matches!!)

 

Interpolating in Logic from fixed steps has almost the same effects as using variable frame rate (instead of fixed). All of this applies to Physics as well (which is the main point of Gaffer's article), but physics engines have the additional problem that simulations become unstable and the "bullet through paper" problem

 

So, in short, you could interpolate values for logic, but this doesn't mean you should. Just do it for graphics.


PARTNERS