Questions from a game launcher dev

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
MK2k
Posts: 9
Joined: Thu Aug 31, 2017 5:59 pm
Contact:

Questions from a game launcher dev

Post by MK2k »

Hey there,

I'm the developer of a game and emulation launcher and I'm currently in the works of integrating ScummVM with its command line interface.

Please bear with me if I missed something but here are my current observations:

In order to properly launch a game via command line you have to either:

(1) know the ScummVM internal gameid (game engine id?) AND the path to the data files

or

(2) use a target string from a scummvm.ini (which is the result of a scan from ScummVM's UI)

Now from the viewpoint of a game launcher, if you want to implement

launching ScummVM via approach (1): you could let the user provide a path to add a game BUT the user also has to decide which gameid should be used

or with

launching ScummVM via approach (2): the user has to pre-scan via ScummVM UI and provide the scummvm.ini to the launcher

I know that D-Fend Reloaded for example goes with approach (1). Currently, I'm more convinced that approach (2) would be more safe, because the user doesn't falsely assume an incompatible gameid with a chosen file path.

Anyways, here are my questions:

(A) Do I miss something here (i.e. are both approaches the only ones)?

(B) Could ScummVM provide a command line option to perform a scan (Add Game...) and quit afterwards? Of course in this case a path should also be provided via command line option as well as an optional alternative scummvm.ini location.

(C) If (B) is possible, would a mass scan (Mass Add...) be also possible via command line option?

With command line options from (B) and (C) the user could choose a path from the launcher and anything else could be scanned automatically. It would be a great solution :)

Oh btw. the launcher I'm working on is https://metropolis-launcher.net

cheers

-- MK2k
User avatar
criezy
ScummVM Developer
Posts: 949
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

You are correct regarding the two ways to start ScummVM with a game. There is also now a third way for which you only need to know the path:

Code: Select all

scummvm --path=<path> --auto-detect
(B) and (C) are also possible since recently.

See the README (or output of ScummVM --help) for details: https://github.com/scummvm/scummvm/blob ... 1416-L1429

What would also be possible now is to use command line to list games in a directory to the standard output, parse this to get the paths, ids and descriptions and use this in your launcher to let the user select a game to start among the ones found.

All this is a recent addition that was not yet available in the last release (1.9.0) but are in current daily builds and will be in the next release. We are also open to suggestions to improve further command line use.
MK2k
Posts: 9
Joined: Thu Aug 31, 2017 5:59 pm
Contact:

Post by MK2k »

Oh! This is just great. Thanks for the infos :)
MK2k
Posts: 9
Joined: Thu Aug 31, 2017 5:59 pm
Contact:

Post by MK2k »

Well, that's odd, neither the current stable 1.9.0 nor the daily 1.10.0 seem to output anything on the command line. I tested with the

Code: Select all

scummvm --help
command. I also tried an administrative shell.
User avatar
criezy
ScummVM Developer
Posts: 949
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

This might be related to the problem being discussed in this thread: --list-games and -z do not seem to work
MK2k
Posts: 9
Joined: Thu Aug 31, 2017 5:59 pm
Contact:

Post by MK2k »

Indeed, I can confirm same behaviour in Win 8.1

When capturing the StdOut from process, I get some content, so in the launcher it kind of works.

What doesn't work right now in the daily build 1.10.0git4690-g8878292: the detection process doesn't write to the scummvm.ini. This applies to the detection run via command line option as well as via the UI (Mass Add...).

If run via UI, the UI closes (crash?). The log doesn't provide an error message. Only "The game ... seems to be unknown" messages appear in the log.
MK2k
Posts: 9
Joined: Thu Aug 31, 2017 5:59 pm
Contact:

Post by MK2k »

Kirben's build actually delivers a crash event in Windows. I'm analyzing the detection process with debuglevel=10 right now.
MK2k
Posts: 9
Joined: Thu Aug 31, 2017 5:59 pm
Contact:

Post by MK2k »

Last lines before the crash:

Code: Select all

The game in 'D&#58;\Console\Systems\ScummVM &#40;1.9.0&#41;\SVN\Phantasmagoria &#40;CD, Windows&#41;\' seems to be unknown.
Please, report the following data to the ScummVM team along with name
of the game you tried to add and its version, language, etc.&#58;

  &#123;"resource.aud", 0, "aa8f9b8db08567b4b4355a4abf52b5c1", 9521749&#125;,
  &#123;"ressci.000", 0, "cd5967f9b9586e3380645961c0765be3", 116822037&#125;,
  &#123;"resmap.000", 0, "9a479f0ab586359b424e35165dd7559e", 16468&#125;,

Opening hashed&#58; RESOURCE.AUD
Opening hashed&#58; RESOURCE.SFX
I tested without the Phantasmagoria and it runs completely through.

Last test is Phantasmagoria only and it crashes. So the crash is caused by it's files.
Post Reply