Adventuregamestudio (AGS) Scriptmodule Updates
-
It seems an update for the Adventure Game Studio is just around the corner: v3.6.0
I testdrived the release candidate of AGS and noticed the
ags.sh
scriptmodule needs some updates.The updates are currently held here [1].
Some questions before submitting a PR:
- General design decision to the maintainers @BuZz , @mitu of RetroPie: Is AGS still assumed to be an own system/scriptmodule or is it planned to use the ScummVM integration of AGS?
If the AGS scriptmodule is used also in the future, here are the changes and additional technical questions:
- The upcoming version uses SDL2, thus no XSession is needed.
- Games of AGS may consist of different files (the
game.exe
itself but then also:speech.vox
(voiceover),audio.vox
(game music) and*.tra
(translation files). The ags engine expects either an path to a single*.exe
file or if there are several files an path to the game folder which contain the above mentioned files. Thus I propose to have this folder structure ((1) is an empty file for scrapers and ES):
$ tree /home/pi/RetroPie/roms/ags /home/pi/RetroPie/roms/ags ├── gamelist.xml ├── Kathy Rain │ ├── audio.vox │ ├── Deutsch.tra │ ├── Espanol.tra │ ├── Francais.tra │ ├── Italiano.tra │ ├── Kathy Rain.exe # (1) │ ├── Polski.tra │ └── speech.vox ├── Kathy Rain.exe └── +Start AGS.sh
- The gamesaves are stored by default in
~/.local/share/ags/<game>/
, is this the "RetroPie-way?" or is an different location preferred? - The proposed changes require lib SDL2_sound [2], which is installed with the prefix
/usr/local
, again: Is this the "RetroPie-way?"
Thanks for some advise/hints.
[1] https://github.com/Gemba/RetroPie-Setup/blob/fb_ags_v360_prep_scriptmodule/scriptmodules/emulators/ags.sh
[2] https://github.com/icculus/SDL_sound -
For now, let's keep it that way.
No plans to replace it yes with ScummVM - is there a 100% compatibility between AGS and ScummVM ? I'm not quite familiar with AGS.- The upcoming version uses SDL2, thus no XSession is needed.
That's a welcomed change, but are you sure there are no other constraints - like the need of a Window manager to run or reliance on X11 specific functionality ?
- Games of AGS may consist of different files (the
game.exe
itself but then also:speech.vox
(voiceover),audio.vox
(game music) and*.tra
(translation files). The ags engine expects either an path to a single*.exe
file or if there are several files an path to the game folder which contain the above mentioned files. Thus I propose to have this folder structure ((1) is an empty file for scrapers and ES):
$ tree /home/pi/RetroPie/roms/ags /home/pi/RetroPie/roms/ags ├── gamelist.xml ├── Kathy Rain │ ├── audio.vox │ ├── Deutsch.tra │ ├── Espanol.tra │ ├── Francais.tra │ ├── Italiano.tra │ ├── Kathy Rain.exe # (1) │ ├── Polski.tra │ └── speech.vox ├── Kathy Rain.exe └── +Start AGS.sh
I have no opinion on this - is it just for the scraper support ?
- The gamesaves are stored by default in
~/.local/share/ags/<game>/
, is this the "RetroPie-way?" or is an different location preferred?
Usually you'd symlink this into
/opt/retropie/configs/<system>
to be accessible via file shares (backup/restore/modify configs etc.) See how themoveConfigDir
function is used.
If there's some global AGS config that forces saved in the game's folder, that would be better.- The proposed changes require lib SDL2_sound [2], which is installed with the prefix
/usr/local
, again: Is this the "RetroPie-way?"
No, it's not the preferred way. Normally you'd try a static build (since
SDL_sound
only depends onSDL
) and link to it if possible. However, there's theAGS_USE_LOCAL_SDL2_SOUND
option in AGS'sCMakelists.txt
build file, which I think already does that (downloads the source, builds and links it locally to the project). Give it a try. -
I have some heavy AGS games( like Technobabylon) and i have try them in both ags and scummvm. With ags emulator, games running faster than scummvm, especially in RPi3
-
@mitu thanks for the nudges. I updated the scriptmodule in my feature branch.
Re: Config
I updated the script accordingly. Turned out that with theXDG_DATA_HOME
environment variable the configuration directory can be set without using symlinks.Re: SDL_Sound
The SDL_sound is now statically linked. Thanks for that hint, made things easier.Re: X11
I had not the impression that there is a dependency to X11. Seems SDL2 is all what it needed. However, I did test only a few games.Re: Scraper
I can only speak for Skyskraper. Platformags
is not supported currently. However, I symlinked a none used platform on my setup (gc
toags
) and scraped with platformpc
and with sourcemobygames
which gave me some hits. I exported the hits from thepc
cache of Skyskraper and then imported them intogc
respectivelyags
. Awkward workaround but it did the trick.
The file/folder format is to make Emulationstation and to encapsulate AGS files (because every AGS game usesaudio.vox
,speech.vox
, aso.)Re: ScummVM
The AGS maintainers follow quite strictly the upstream of AGS, but currently there are two known bugs [1,2] pending which are only solved upstream. However, I assume in a few weeks ScummVM will sync with AGS upstream.Attn.: These are containing spoiler for the games.
[1] https://bugs.scummvm.org/ticket/14197
[2] https://bugs.scummvm.org/ticket/13724 -
@windg thanks for the info. Makes sense to me. Can you tell if you are using the software renderer or OpenGL (see:
--gfxdriver
switch ofags
)? -
@Lolonois I am using the default setting, is set to software.
-
OK, I've taken a look at the scrips - thanks for the changes.
I updated the script accordingly. Turned out that with the XDG_DATA_HOME environment variable the configuration directory can be set without using symlinks.
OK, but our approach is usually the use a symlink to
$configdir
. This way it's easier for the user to access it (via shares) and the application works like in a normal installation (thus all application documentation still applies w.r.t. config folders).Re: SDL_Sound
The SDL_sound is now statically linked. Thanks for that hint, made things easier.You also added statically build options for the other libraries added in
depends
, that doesn't seem right. And for sure we'd wantags
to use the system's SDL2 - this way our local SDL2 patches are applied (resolution switching, DRM/KMS support).Re: Scraper
To be honest, since we already have
game.exe
andgame/
folder inags
, I don't see the point in adding another (empty)game.exe
underneath the game folder.Other comments for the scriptmodule:
- don't use
make -j$(nproc)
, RetroPie-Setup already takes care of that viaMAKEFLAS
. - what's the point of creating an empty
acsetup.cfg
file ? Is it required byags
?
- don't use
-
Cleaned up a bit. Thanks again.
- Using the
moveConfigDir
approach - Reviewed the static linked libs again and simplified cmake defines
- No more default/dummy
acsetup.cfg
(was thought as convenience, is not mandatory forags
to launch successfully) - Removed uneeded parts from launcher, removed
make -j
flag
Maybe I got the cmake options wrong or I misunderstood your intention, but
ldd
shows Freetype, SDL2, Ogg, Vorbis and Theora libs as dynamically linked. Or are you relating tolibaldmb
andliballegro
?These are the configuration options cmake reports on build:
[...] ------- AGS dependencies options ------- AGS_USE_LOCAL_ALL_LIBRARIES: ON AGS_USE_LOCAL_SDL2: ON AGS_USE_LOCAL_SDL2_SOUND: OFF AGS_USE_LOCAL_OGG: ON AGS_USE_LOCAL_THEORA: ON AGS_USE_LOCAL_VORBIS: ON [...]
Having an empty
game.exe
sibling togame/
and the real game executable ingame/
(must not match the parent folder) is mainly to be able to have a flat gamelist in ES. Without the empty.../roms/ags/game.exe
one would have to navigate into the gamefoldergame/
first and then launch an exe from there. IIRC it is a limitation of ES that it expects roms to be directly in the system's subfolder while maintaining a flat list game list at the same time. - Using the
-
Maybe I got the cmake options wrong or I misunderstood your intention, but ldd shows Freetype, SDL2, Ogg, Vorbis and Theora libs as dynamically linked. Or are you relating to libaldmb and liballegro?
I think I may have the meaning of the option wrong, the way it's right now is fine.
Having an empty game.exe sibling to game/ and the real game executable in game/ (must not match the parent folder) is mainly to be able to have a flat gamelist in ES. Without the empty .../roms/ags/game.exe one would have to navigate into the gamefolder game/first and then launch an exe from there. IIRC it is a limitation of ES that it expects roms to be directly in the system's subfolder while maintaining a flat list game list at the same time.
You're right, it's fine. I was under the impression (following the docs) that we already have the configuration with the
.exe
in theags
folder already covered.A few more notes on the scriptmodule:
- don't use
[pushd|popd] || exit 1
, we don't use it like this. If the folder creation was problematic,make
would fail and the build would be failed also. - there's no point in creating the launcher in the
ags
folder. The+Start <Emu>.sh
construct is for the cases where the emulator can be launched without content, either for configuration (i.e.scummvm
) or for direct launch (i.e.dosbox
).
Create the launch in$md_inst
and don't run the creation if"$md_mode" == "remove"
, there's no point in adding it when the emulator is removed (configure
runs also in the removal phase). - the launcher doesn't test if the
game
folder exists - perhaps it should do that ? If there are games which can run from the.exe
only and there's sibling game folder, then the$ROM
var from the launcher would point to a non-existing folder and - probably - the emulator will throw an error.
- don't use
-
I ironed out the issues you mentioned, thanks again for the advise.
I will document these scriptmodule design notes for the wiki in the next days.
-
@Lolonois Thanks for your efforts on this.
-
@Lolonois said in Adventuregamestudio (AGS) Scriptmodule Updates:
I ironed out the issues you mentioned, thanks again for the advise.
Look ok. One final niggle - module specific functions should be suffixed with the module name, to prevent name collisions. So
create_launcher
should becreate_launcher_ags
. We also prefer that local utility functions to be prefixed with_
(i.e._create_launcher_ags
).
I think it's enough to submit the changes as a PR.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.