Opened 7 years ago

Closed 7 years ago

#9607 closed defect (fixed)

AGI: Animation and timers too fast with OpenGL backend

Reported by: dmwarren Owned by: m-kiewitz
Priority: normal Component: Engine: AGI
Version: Keywords: cycle, animation
Cc: Game: King's Quest 1

Description (last modified by m-kiewitz)

Game
KQ1 AGI from the Roberta Williams Anthology. ScummVM identifies it as v2.0F 1987-05-05 5.25"/3.5"/DOS/English

logdir: 10ad66e2ecbd66951534a50aedcd0128
vol.0: 9081ab588c09202729cfd224b2f57301
object: 6eca02fa540337308529ff13e9e764aa

Also reproducible with Fastest mode in The Black Cauldron (2.00 1987-06-14 DOS/English), freely available at XXX

Platform
OS X 10.11.6

Problem
Setting the animation speed to "fast" or "fastest" makes the animation run at an almost unplayably fast speed.

Timers run fast as well. (e.g., in KQ1 the fairy dust only lasts ~40 seconds)

Was not able to reproduce bug with other graphics backends or other AGI titles (KQ2, KQ3, SQ2).

Last commit where bug was not present
778c1ddb69bb45b6992fdc9b8fff6b2c8d3e22ac

First commit where bug is present
34117170f2955e854a93925a652af37575361b44

Steps to Reproduce

  1. Grab OS X machine. (haven't tested other platforms)
  1. Load KQ1 (see version info above) or The Black Cauldron with an affected version of ScummVM.
  1. Set Graphics mode to OpenGL, either filtered or unfiltered.
  1. Start game. Switch to 'fast' or 'fastest' animation speed.
  1. Move around. If the bug is present, it will take just ~4 seconds to cross a screen. Fine movement will be very difficult because you're moving too fast. Timers will expire in seconds instead of minutes.

Change History (7)

comment:1 by m-kiewitz, 7 years ago

I can not reproduce this on Windows.

Could it be that on Mac OS delays for 10 milliseconds are ignored? Because otherwise there is basically no way that AGI games can run that fast.

Speed in AGI games is not controlled by graphics, but by timer.

Also removed link, because the legal situation isn't that simple.

comment:2 by m-kiewitz, 7 years ago

Description: modified (diff)

comment:3 by dmwarren, 7 years ago

Also reproducible on Debian 8.6 using 1.10.0git254-gc118e2f. Again, both the animation and timers are affected.

Could it be that on Mac OS delays for 10 milliseconds are ignored? Because otherwise there is basically no way that AGI games can run that fast.

All I can tell you is that they do. :-)

OS X was one of the platforms where frame skipping (commit d43c593e2e41666f586b94f1dfbe1f7b999405f0) sped up transitions to a sensible speed in case that's a clue.

comment:4 by m-kiewitz, 7 years ago

Can you please try again?

The original AGI had a speed setting that let the game run as fast as possible. We didn't go as far, but it still resulted in way too many cycles per second.

I changed that now, so that it should get limited to 40 frames per second.

This should fix "Fast" in your KQ1 and "Fastest" in Black Cauldron.

The game speed setting before that is "1", which should result in around 20 frames per second.

Commit 32ca051485d6bce0939d8fec0676a1fd5d537fc2

comment:5 by m-kiewitz, 7 years ago

Owner: set to m-kiewitz

comment:6 by dmwarren, 7 years ago

Looks good on both OS X and Linux. Cheers and thanks!

comment:7 by m-kiewitz, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.