Missing cheating case

A client could send a negative DeltaTime. That would allow the cheater to rewind when they make a mistake. Then they can use a greater DeltaTime to catch up for the “lost” time.
For that matter, they don’t need to use it only for mistakes. With clever use of steering and speed, they can still move toward the goal using negative time. It’s not a true rewind after all.

Slightly outside the scope of what we currently have in this lesson, if the cumulative DeltaTime is used to time the duration of a lap or race, they can’t use that to appear first even when they are dead last.

And more generally, they can send small DeltaTime to slow down time for themselves, see what others are doing, then use the time gained to choose an optimal path and go through it quickly using extra long DeltaTime.

In other words, we should have a check to see that DeltaTime remains in a reasonable range and somewhat consistent over time, and how far behind the client simulated time can fall.

1 Like

Very good point. A check probably between 0 and 5 should be more than sufficient, possibly just 0 and 1 - the larger range could permit cheating but would handle any lag issues/freezing.