Opened 4 years ago

Closed 4 years ago

#12105 closed defect (fixed)

SCI: QFG4: Dr. Cranium's Bells only sound once, when rung multiple times

Reported by: benmarz Owned by: sluicebox
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: Game: Quest for Glory 4

Description

The door puzzle for entering Dr. Cranium's lab building involves matching a pattern of bell rings. The patterns become more complicated (to a limit) the more times you enter the lab building. Some patterns involve the same bell being rung multiple times in a row. When the GOG version of the game is played on dosbox, each ring makes its own sound. When played on ScummVM 2.2.0 (Nov 18 2020 20:02:58) from the official Snap package running on Ubuntu 18.04, the bell only sounds once if it is rung multiple times in a row.

Change History (3)

comment:1 by sluicebox, 4 years ago

Thank you for reporting this and describing it so well.

I can reproduce this with our latest code and it looks like it occurs in all QFG4 versions. To reproduce: go to room 280, set global 342 to 0 or 4, and try to open the door on the right. global 342 controls which bell sequence is played.

The relevant scripts are sFlashRopeScr and sRingsBell which cumulatively delay for 40 ticks and several game cycles (at least 6) when playing a bell. The bell sound is longer than that though, I think almost 2 seconds, and playing the same sound while it's already playing doesn't restart it. For example, set global 342 to 4 for a puzzle where the purple bell plays four times in a row. The second and third play don't interrupt/restart the first, but the fourth works because the first is now finished playing. The relevant sounds are sound resources 1-8.

It looks like either we're doing something different with regard to restarting sounds, or maybe the timing is different in ScummVM and the sounds are completing in the original before the next one is played.

comment:2 by sluicebox, 4 years ago

Summary: Dr. Cranium's Bells only sound once, when rung multiple timesSCI: QFG4: Dr. Cranium's Bells only sound once, when rung multiple times

comment:3 by sluicebox, 4 years ago

Owner: set to sluicebox
Resolution: fixed
Status: newclosed

Fixed in: https://github.com/scummvm/scummvm/commit/beee3b5f25fb52c0832b6de1b320fc790102e18a

Thank you again for reporting this, this was a really nice test case for some tricky behavior we've been trying to get right for a while.

Note: See TracTickets for help on using tickets.