@hasherr lesson here: calculations are done one operator at a time. the first calculation was an integer * float, which means the best resolution you would get from the division or anything after that was a float's resolution
I'm betting: return (Sys.getTime() * 1000.0f) / Sys.getTimerResolution(); also returns a float, divided by a long (converting to long), then returning a float
now! here's your quiz. what is the difference between these two lines? (double) (Sys.getTime() / Sys.getTimerResolution()); (double)Sys.getTime() / Sys.getTimerResolution();
@IcyDefiance I am talking about a specific game, SMB, which has the issue I am talking about. There are always ways around any issue but that dev did not solve the issues
@hasherr, .. and since the result was < 1, 0.016..., converted to an int it became 0 . In case of B, both the operands were "raised"(treated as) double, so the result of division could be retained as is, with its fractional value (double represents a Real value)
@Jimmy variable timestep doesn't exactly give variable friction. that's what happens when you either have variable timestep and don't account for it, or have fixed timestep and lag a little
the only variable with proper variable timestep code is the precision of floats or doubles, which is hardly noticable
jumping through walls is a problem when your framerate is too low and you're moving too far between collision checks, which is a problem with SMB
but then you could do the thing in slow motion by intentionally limiting the resources it's allowed to use, effectively cheating your way through the game