Opened 2 years ago

Last modified 8 months ago

#10270 new defect

SCI: LSL7: Ocean outside portholes jumps

Reported by: DanielSWolf Owned by:
Priority: normal Component: Engine: SCI
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)

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

Download all attachments as: .zip

Change History (7)

comment:1 by csnover, 2 years ago

Keywords: sci32 added

comment:2 by csnover, 2 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, 2 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, 8 months ago

Attachment: sea.gif added

by DanielSWolf, 8 months ago

Attachment: sea-tracking.png added

by DanielSWolf, 8 months ago

Attachment: sea-tracking-closeup.png added

comment:4 by DanielSWolf, 8 months ago

I took a screen recording to illustrate the problem:

https://bugs.scummvm.org/raw-attachment/ticket/10270/sea.gif

I also tracked the ocean's vertical motion. Here is the resulting graph:

https://bugs.scummvm.org/raw-attachment/ticket/10270/sea-tracking.png

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:

https://bugs.scummvm.org/raw-attachment/ticket/10270/sea-tracking-closeup.png

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 8 months ago by DanielSWolf (previous) (diff)
Note: See TracTickets for help on using tickets.