Opened 3 years ago
Last modified 23 months ago
#10270 new defect
SCI: LSL7: Ocean outside portholes jumps
Reported by: | DanielSWolf | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | sci32 | |
Cc: | Game: | Leisure Suit Larry 7 |
Description
Many rooms in LSL7 feature a porthole through which you can see the ocean slowly moving upwards and downwards. This ought to look rather smooth; compare the beginning of this video: https://www.youtube.com/watch?v=onIy436mqEk&t=172s.
However, in ScummVM, the ocean sometimes "flickers" up or down before resuming the smooth animation again. To reproduce, walk into the screen featuring (non-sexy) Victorian Principles and watch the ocean for 10-20 seconds.
I'm running the daily build from Sep 26 2017 on Windows 7 64-bit without any scalers.
Attachments (3)
Change History (7)
comment:1 by , 3 years ago
Keywords: | sci32 added |
---|
comment:2 by , 3 years ago
comment:3 by , 3 years ago
Oh, I also forgot to mention, the values in and out of kMulDiv and kSinMult don’t seem to be abnormal when these glitches happen (no crazy out-of-range values).
by , 23 months ago
by , 23 months ago
Attachment: | sea-tracking.png added |
---|
by , 23 months ago
Attachment: | sea-tracking-closeup.png added |
---|
comment:4 by , 23 months ago
I took a screen recording to illustrate the problem:
I also tracked the ocean's vertical motion. Here is the resulting graph:
In this image, it's easy to see that the motion should consist of various sine waves blending into each other. However, at the far right of the graph, a segment of the sine wave seems to be offset in time, causing a backwards jerk at the beginning, then a forward jump.
Also, at the extreme positions, the sea tends to jump back and forth between two positions. See this closeup:
Unfortunately, I don't know how to debug SCI scripts, and I couldn't find a tutorial. Maybe someone with more SCI knowledge can help?
I spent some time looking at this today and I am not entirely sure what is going on yet. The kMulDiv and kSinMult/kTimesSin implementations in ScummVM are not accurate to the original interpreter and return slightly different values pretty frequently, but I implemented some fully reversed versions of these functions (SinMult is definitely an interesting edge-case, since the original interpreter does an out-of-bounds read into the value table for atan when degrees = 90) and these implementation differences don’t appear to be the cause of the trouble. So, more investigation is needed.