Opened 17 years ago

Closed 15 years ago

#3136 closed defect (fixed)

BASS: Speed difference

Reported by: eriktorbjorn Owned by: joostp
Priority: normal Component: Engine: Sky
Version: Keywords:
Cc: Game: Beneath a Steel Sky

Description

BASS 0.0372 Latest SVN version

While comparing BASS in ScummVM to BASS in DOSbox, I noticed that even on a fast computer, the default game speed seems noticeably faster in ScummVM than it is in DOSbox.

Ticket imported from: #1690836. Ticket imported from: bugs/3136.

Change History (11)

comment:1 by bluegr, 17 years ago

I don't have the original BASS interpreter, but the game does seem too fast to me as well. Perhaps there's not enough delay between displayed frames? The most likely culprit seems to be needDelay in sky.cpp line 339. Changing line 333 from: delayCount += _systemVars.gameSpeed; to: delayCount += 2 * _systemVars.gameSpeed; seems to make game speed more "normal" for me, but this is just speculation. I don't know how gameSpeed and delayCount are related, just that in line 335 there is a check to see if needDelay is greater than 4 times the value of gameSpeed (why 4 times?). Perhaps someone with the original game source can shed some more light here.

comment:2 by fingolfin, 17 years ago

Robert, any insighty on this one?

comment:3 by fingolfin, 17 years ago

Owner: set to cyxx

comment:4 by fingolfin, 17 years ago

Or maybe Joost has an idea?

comment:5 by fingolfin, 17 years ago

Owner: changed from cyxx to joostp

comment:6 by sev-, 15 years ago

What is the status of this item?

comment:7 by eriktorbjorn, 15 years ago

Unchanged, I believe.

comment:8 by joostp, 15 years ago

At some point (a fairly long time ago) the delay value was changed, presumably to make it more accurate to the original, however it seemed to have speeded things up unintentionally. All I know is that I was never able to figure out how that value was derived, nor do I remember who it was that changed it. Perhaps svn log/blame can tell us more.

comment:9 by joostp, 15 years ago

quickly looking at svn log, it seems to have been changed with this commit:

---------------------------------------------------------------------------- r19792 | lavosspawn | 2005-12-13 16:05:06 +0100 (di, 13 dec 2005) | 2 lines

changed delay code ----------------------------------------------------------------------------

of course, it could be that the old behaviour was also wrong (or even worse), so probably best would be to consult the original source code.

comment:10 by joostp, 15 years ago

Should be fixed as of r36318. The original interpreter's delay is 4 50hz ticks = 80ms (1000 / 50 * 4).

Changing the engine game speed to match this makes it run at the correct speed as far as I can tell.

comment:11 by joostp, 15 years ago

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