OneShortEye

King's Quest AGI Speed Explained

Aug 1st, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. In the King's Quest speedrunning community, we occasionally receive questions along the lines of:
  2.  
  3. "Why does your game run so fast? It looks like Graham is moving at supersonic speed."
  4.  
  5. This is a fair question. Most people remember playing the game at a more "reasonable" speed, even on Fast.
  6.  
  7. KQ1 was originally released in 1983 for the PCjr. We don't run this version. It's not only slow, but there are very slow re-draw animations before every screen that would kill a speedrun's momentum.
  8.  
  9. Here's an example of the re-draw in action: https://www.youtube.com/watch?v=Kd1cUB614Y4
  10.  
  11. Instead, we run version 2.0F, released in 1987 for IBM PC compatibles.
  12.  
  13. The game was designed so that on Fast speed, the game runs as fast as your CPU will allow, unrestricted by real time.
  14.  
  15. On faster CPUs, then, Graham will move at increasingly faster speeds, until you get to the speed you see in the current speedruns.
  16.  
  17. Isn't that unfair, though, taking advantage of modern CPU speeds? Actually, no. The CPU clock speeds being released around 1987 were in the 10-20mHz range. At 20 mHz, Graham's movement speed is pretty much indistinguishable from speeds you would get on a modern PC. (Here's the TAS, for example, which runs at 20mHz: https://www.youtube.com/watch?v=XAg25m2iA5M).
  18.  
  19. In other words, machines being released within a year or two of the game could already achieve the speeds we run at today.
  20.  
  21. So why do you remember Graham moving slower? You either played the game on a slow machine back in the day (maybe around 4-8mHz), or you got the game from GOG or Steam. The GOG and Steam distributions artificially throttle the max speed of the game so that it becomes playable for the casual gamer.
  22.  
  23. Okay, so why don't we also set up DOSBox to emulate a computer running at 4mHz? Unfortunately, it's not so simple. You can set the "cycles" variable in DOSBox, which is "the amount of CPU instructions emulated each millisecond."
  24.  
  25. However, DOSBox's speed is also determined, in part, by your PC's specs. Therefore, it's impossible to provide an exact value for CPU cycles that would yield a given mHz clock speed. There are some conversion estimates, but they are only approximations.
  26. So, in short, we run the game at max cycles because it lets us complete the game as fast as possible. Many PCs released around the time of the game could already achieve these lightning-fast speeds, so it's not "cheating." The alternative, slowing down the game, means picking an arbitrary cycle speed that yields different results for different PCs.
  27.  
  28. Big thanks to DrD2k9, who provided much-needed technical information.
  29.  
Add Comment
Please, Sign In to add comment