ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > General Discussion > Questions from a game launcher dev
Questions from a game launcher dev
  Author    Thread Reply to topic
MK2k



Joined: 31 Aug 2017
Posts: 6
Questions from a game launcher dev 

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 Smile

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

cheers

-- MK2k

 Reply with quote  
Post Thu Aug 31, 2017 9:55 pm 
 View user's profile Send private message Visit poster's website
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 459
Location: West Sussex, UK
 

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:
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/master/README#L1416-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.
 Reply with quote  
Post Fri Sep 01, 2017 12:46 am 
 View user's profile Send private message
MK2k



Joined: 31 Aug 2017
Posts: 6
 

Oh! This is just great. Thanks for the infos Smile

 Reply with quote  
Post Fri Sep 01, 2017 8:09 am 
 View user's profile Send private message Visit poster's website
MK2k



Joined: 31 Aug 2017
Posts: 6
 

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:
scummvm --help



command. I also tried an administrative shell.
 Reply with quote  
Post Fri Sep 01, 2017 5:50 pm 
 View user's profile Send private message Visit poster's website
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 459
Location: West Sussex, UK
 

This might be related to the problem being discussed in this thread: --list-games and -z do not seem to work

 Reply with quote  
Post Fri Sep 01, 2017 9:59 pm 
 View user's profile Send private message
MK2k



Joined: 31 Aug 2017
Posts: 6
 

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.

 Reply with quote  
Post Fri Sep 01, 2017 10:14 pm 
 View user's profile Send private message Visit poster's website
MK2k



Joined: 31 Aug 2017
Posts: 6
 

Kirben's build actually delivers a crash event in Windows. I'm analyzing the detection process with debuglevel=10 right now.

 Reply with quote  
Post Fri Sep 01, 2017 10:30 pm 
 View user's profile Send private message Visit poster's website
MK2k



Joined: 31 Aug 2017
Posts: 6
 

Last lines before the crash:

code:
The game in 'D:\Console\Systems\ScummVM (1.9.0)\SVN\Phantasmagoria (CD, Windows)\' 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.:

  {"resource.aud", 0, "aa8f9b8db08567b4b4355a4abf52b5c1", 9521749},
  {"ressci.000", 0, "cd5967f9b9586e3380645961c0765be3", 116822037},
  {"resmap.000", 0, "9a479f0ab586359b424e35165dd7559e", 16468},

Opening hashed: RESOURCE.AUD
Opening hashed: 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.
 Reply with quote  
Post Fri Sep 01, 2017 10:55 pm 
 View user's profile Send private message Visit poster's website
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge