luxtorpeda-dev/packages

SCUMMVM engine script takes a long time to startup for The Longest Journey

Closed this issue · 5 comments

Game

The Longest Journey

Engine

ScummVM

Linux Distribution

Ubuntu 22.04

Luxtorpeda Version

v68.0.0

Bug description

Due to the folder structure of "The Longest Journey" and the way the default run-scummvm.sh script is setup for the ScummVM engine, launching "The Longest Journey" takes up to 1 minute on my machine even if it is installed on an SSD. Other ScummVM engine games that have a different folder structure (i.e. Indiana Jones and the Fate of Atlantis) do not show this problem.

Steps To Reproduce

  1. Install The Longest Journey using the ScummVM engine
  2. Start the game via Steam
  3. Wait up to 1 minute until the ScummVM interface becomes visible

Expected Behavior

ScummVM should start instantly without any significant waiting time.

Additional Context

TLJ contains a lot of subfolders within subfolders. I found that this might be the reason why startup is so slow, since the --recursive flag is used when starting ScummVM.

I therefore tried and managed to solve this by removing the "--recursive" flag in the scum/run-scummvm.sh script, changing

LD_LIBRARY_PATH="lib:$LD_LIBRARY_PATH" ./bin/scummvm -c "$INIPATH" --add --recursive $PATH_ARG

to

LD_LIBRARY_PATH="lib:$LD_LIBRARY_PATH" ./bin/scummvm -c "$INIPATH" --add $PATH_ARG

With this change, the game starts up instantly as expected. Perhaps there is an easy way to disable this flag for specific games. :)

Relevant log output

No response

When you tested removing the recursive flag, did you verify that this works with no scummvm config? As in a fresh start?

That'll help to make sure just removing the recursive flag will work for future installs, or if a particular path is needed.

I tested removing

/<tlj dir>/scum/scumm.ini

and restarted the game with the "--recursive" flag, then repeated the process without the "--recursive" flag in (run_scummvm.sh) and I got identical results except for the huge difference in startup time. The game is properly detected. Not sure that is the exact test you were looking for.

Unrelated:

By the way, this time I also noticed that the game doesn't work in ScummVM properly, at least on my machine, unless one picks "OpenGL" in the "Game 3D Renderer" settings in the global options. If I don't change any of the standard settings, the ScummVM just gives an error message:

ERROR: Could not open shader stark_surface.vertex

The weird thing is that I can locate this file in

<tlj dir>/scum/share/scummvm/shaders

but it seems ScummVM can't find it or needs some other additional configuration to make that happen.
Anyway, this seems to be happening independently of the --recursive flag and I was just lucky when I tried it initially because I set "OpenGL" as the "Game 3D Renderer" myself when I started the game for the first time.

EDIT: Just found a way to solve that "shader" problem by copying the shaders directory that contains "stark_surface.vertex" into the base directory of the game. After copying the files it runs directly out of the box.

Thanks for testing, can you see if the latest works for you? It'll be ready when this action is complete: https://github.com/luxtorpeda-dev/packages/actions/runs/7794808744

Perfect! I reset my install and it re-downloaded and loads instantly and boots right with the preconfigured settings using OpenGL. Previous saves were also working as expected. And cool that you also linked the shaders directory, so if people want to use a different renderer, it should work as well. :)

Good to hear!