Opened 5 years ago

Last modified 3 years 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


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:

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)

sea.gif (139.1 KB ) - added by DanielSWolf 3 years ago.
sea-tracking.png (21.1 KB ) - added by DanielSWolf 3 years ago.
sea-tracking-closeup.png (9.2 KB ) - added by DanielSWolf 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by csnover, 5 years ago

Keywords: sci32 added

comment:2 by csnover, 5 years ago

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.

comment:3 by csnover, 5 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 DanielSWolf, 3 years ago

Attachment: sea.gif added

by DanielSWolf, 3 years ago

Attachment: sea-tracking.png added

by DanielSWolf, 3 years ago

Attachment: sea-tracking-closeup.png added

comment:4 by DanielSWolf, 3 years 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?

Last edited 3 years ago by DanielSWolf (previous) (diff)
Note: See TracTickets for help on using tickets.