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

1.19K 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

The computer does things as fast as it can. However, for a video or a game, it might be too fast or too slow.

For video, there are time markings in the stream/file that tell it when to play a frame of video. Sometimes you’ll see a video fast forward to catch up. That’s because our brains are too smart and when we watch a video, our brains would prefer to just skip stuff as long as the time make sense, versus stopping and then starting. For instance, if you are playing a song on the piano or guitar or whatever, and you screw up … it’s much better to carry on and NOT stop and play the part you screwed up.

For video games, it’s similar in that real time-ish games must be played at a reasonable human speed. So games time when things happen. In some games, that doesn’t matter, like if you are playing chess, you want the computer to play as fast as possible and then get back to your turn.

Here’s a fun example of a game not timing properly. Back in the 80s/90s there was an awesome video game series called “Wing Commander” which was a space fighter-pilot sim. At the time, the game needed everything your computer could give it. At the time, computer models were well known. Like a Commodore 64 ran at a certain clock rate. An IBM PC ran at like 8 Mhz so at that clock speed, the game played at a pretty decent speed. As computers got faster, especailly IBM PCs and clones…the code just simply ran faster and faster. Not only the clock rate, but the CPUs did things faster per clock tick.

So try running Wing Commander today with a DOS emulator. It’s hilarious. It was meant to run at 8 Mhz (roughly 8,000,000 instructions per second), and todays computers are typically around 3,500 Mhz, but pipeline more so it’s more like effectively 8,000 Mhz. So try running Wing Commander at 1000x speed. LOL. So to make it useable the DOS Emulator actually has to waste cpu cycles doing nothing.

So that brings us back to modern games and computers. You CAN’T run a game at full speed because everyone has a different computer, and therefore the speeds are all different.

Now what you CAN do with your extra computing power (and graphics computing power) is … allow the computer to add fancy effects, or run at higher resolutions. When you turn on the “extras” you WILL tax your hardware to the max.

However, the most important thing for modern computer games is how smoothly they play, and less so how pretty they look.

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