If a computer is powerful enough, how does it know not to play videos or perform logic for games at a faster speed?

1.22K views

I don’t know if I’m explaining this right…
A computer can run logic at some speed based on how powerful the components of it are, so if it can perform the logic of something, for example, movement in a game, how does it know how much should be done based on its power, instead of essentially running in “fast-forward” or conversely in slow motion?

In: 1307

40 Answers

Anonymous 0 Comments

If the original was like asking a group of little kids to draw as fast as they can and they can make one picture every minute, and everybody is about that speed. Then fast forward to a few years later. The fast ones can draw a picture every ten seconds and some take thirty seconds. So instead, you ring a bell every minute and collect whatever they have then.

A long time ago there was that problem. Computers were not very fast or powerful, so programmers skipped the logic that controls the speed because it was extra work for the processor and they couldn’t spare it. And there weren’t as many possible combinations for computer speed, no variations like today a processor might come in multiple speeds. So a game would be tuned to run at the right speed for a given computer because that was the only one. The https://en.wikipedia.org/wiki/Turbo_button was used to force a computer to match the original.

> With the introduction of CPUs which ran faster than the original 4.77 MHz Intel 8088 used in the IBM Personal Computer, programs which relied on the CPU’s frequency for timing were executing faster than intended. Games in particular were often rendered unplayable, due to the reduced time allowed to react to the faster game events. To restore compatibility, the “turbo” button was added.[4] Disengaging turbo mode slows the system down to a state compatible with original 8086/8088 chips.

Once it was clear that that timing shortcut was not workable anymore because of the variation in processors (e.g. you could buy any of multiple i486 models https://en.wikipedia.org/wiki/I486#Models in different speeds) programmers started using a clock. Roughly calculate everything and when the clock hits whatever time, send that to the screen.

This was all before multi-tasking really hit consumer computers.

You are viewing 1 out of 40 answers, click here to view all answers.