3 ms·
As a kid, I never understood how the CPU could be too fast for the software. I'm not sure I do now either though. I get timing issues on ROM emulators for the o
by dylan604 7y ago
As a kid, I never understood how the CPU could be too fast for the software. I'm not sure I do now either though. I get timing issues on ROM emulators for the old games using quirks due to NTSC/PAL issues. I know there were other programs that did not work with the Turbo button engaged that were not games where timing might be much more crucial.
- westmeal 7y agoThe developers didn't use fixed time points to update their games logic, they just updated the logic at the same speed of the proc, which leads to some interesting things.
- peripitea 7y agoYou have to explicitly write your code to prevent this from happening. You typically have an engine that is executing all of your logic (rendering, game logic, AI, etc.) in cycles. By default, it will execute these cycles as quickly as possible. So for anything with real-time components, faster CPU = enemies move faster. I forget which game first introduced a fix for this, but the solution is to have the engine run on time-based ticks -- you wait to execute the next cycle until the requisite time has passed.
- repsilat 7y agoAnother alternative is to say, "How much time has passed since the last frame?" and update the game state based on that. When your computer can't hold a constant framerate, the game doesn't slow down.