# What is the Shannon rule/law when talking about game physics?

I've been reading some articles on game physics and came across subjects such as fixed timestep (article). Some of the articles I read mention the "Shannon rule" or "Shannon law" in relation to the length of the timestep. Example quote:

Your timestep should be at least 1 / 120 seconds or smaller because of the Shannon rule [...]

Here's an answer here on Gamedev that mentions it. Some quick google searches for "Shannon's law" doesn't seem to yield much result except for this wikipedia article but I'm not sure if that's what is being talked about here.

So what is the Shannon rule / Shannon law?

In short, you cannot find it because it is incorrectly named.

The quote refers to the Nyquist sampling theorem (or rather the Nyquist rate), the former sometimes also being referred to as the Nyquist-Shannon sampling theorem, and also known under a couple of different names.

If you want no aliasing at 60Hz, you need a 120Hz sampling. Here, "sampling" is the frequency of your simulation.

Although Shannon's name appears in the Nyquist-Shannon theorem, his name is usually associated with entropy (whereas Nyquist is usually associated with the Nyquist rate).

• Ah that makes sense. But what is aliasing in this context? Jitter? – Charanor Nov 14 '17 at 18:47

When you have a fixed timestep, then your graphics framerate should be at most half your physics framerate.

When your graphics framerate is more than that, then sometimes there will be two logic updates between two rendered frames and sometimes just one. This leads to a perceived lack of smoothness which some players describe as "jitter", "stutter" or "microlag".

60 Fps is usually considered the highest framerate the human eye can perceive when looking at 3d graphics. It's also the highest framerate most consumer-grade monitors support*, so there is little reason in rendering any faster. That's where the 120 Ticks per second number comes from.

*"Gaming monitors" with 120Hz and more are still a niche product, but they are becoming more popular lately. If they really have a point or are just a placebo is an ongoing debate.

• You've just reminded me of what happened in the PC port of Dead Space. Horrific control scheme aside, the physics engine was tied to the graphics engine. Disabling the 30fps frame rate limit let to things going a little wonky. – Baldrickk Nov 13 '17 at 16:16