Breaking engines into executable modules

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

Moderator: ScummVM Team

Post Reply
NiQ
Posts: 7
Joined: Sun Oct 17, 2010 11:52 am

Breaking engines into executable modules

Post by NiQ » Wed Aug 07, 2019 8:24 pm

The ScummVM 2.0.0 executable binary is ~35MB in size and as more engines are added it'll inevitably get bigger. This may be an issue with low-end devices in the future. There's no real reason to have a game engine for a game that you don't even own when you're low on storage and there's no real reason to load any game engine into RAM except for the one for the game you're currently playing.
I wonder whether it's worth the effort to break the game engines into different executable modules (.so / .dll etc.) that can be distributed separately (e.g. you could apt-get install the specific engines you need). When a game is played only the relevant game engine will be loaded, greatly reducing the RAM footprint.
Could this be considered?

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

Re: Breaking engines into executable modules

Post by criezy » Wed Aug 07, 2019 11:04 pm

This is already, and has been for some time, an issue with low-end devices. In the past we had some platforms for which we needed to split a release into several executables. And this is why we have added (about 10 years ago I think) the ability to build engines as plugins instead of having everything in a single executable. Plugins are however only used by default on platforms with low memory, and for desktop computers the default is to build a monolithic executable.

And also, independently of the plugin vs monolithic option, when you compile ScummVM yourself you can also select which engines to include.

Kasenshlogga
Posts: 5
Joined: Thu Jul 18, 2019 1:31 pm

Re: Breaking engines into executable modules

Post by Kasenshlogga » Mon Aug 12, 2019 3:10 pm

How "low-end" are we talking? I mean even the $5 Raspberry Pi zero has 512 MB which is plenty and that's about as low-end as you can get.

User avatar
MusicallyInspired
Posts: 1029
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: Breaking engines into executable modules

Post by MusicallyInspired » Mon Aug 12, 2019 3:40 pm

The Nintendo DS port had to be split into various engines because of memory issues (the original Nintendo DS has 4 MB of RAM and 256 kB of Serial Flash Memory). And even then, Full Throttle and The Dig had to be split from the rest of the SCUMM games into their own build and used with a GBA port-loaded memory-expanding cart. IIRC, Curse of Monkey Island wasn't supported at all.
Last edited by MusicallyInspired on Mon Aug 12, 2019 6:55 pm, edited 2 times in total.

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

Re: Breaking engines into executable modules

Post by criezy » Mon Aug 12, 2019 5:26 pm

And we had some discussions on our Discord/IRC channel recently about the PSP and possibly PS Vita hitting their limits as well (the Vita currently doesn't use plugins and we have to disable some engines in the daily builds as otherwise it crashes). The PSP for example only has 32 Mb of memory (or 64 Mb on some models). The Dreamcast doesn't even have that much (it has 16 Mb or RAM i believe). As you can see the Raspeberry Pie zero is actually pretty high-end compared to some other platforms we support :wink:

User avatar
Raziel
ScummVM Porter
Posts: 1089
Joined: Tue Oct 25, 2005 8:27 am
Location: a story that hasn't been written yet

Re: Breaking engines into executable modules

Post by Raziel » Mon Aug 12, 2019 9:15 pm

Just for the sake of curiosity...what are the pros and cons of such dynamic engine modules?

Will the overall RAM/memory consumption go down (as in it will only load the engine module of the game i'm playing?)
I have yet a long way to hit the memory border (1.5 GB) but it's always good to know there are alternatives.

Will the overall memory consumption go down when comiling/linking?
Will it make it more complicated to maintain than with static builds or will it maybe even make it easier?

Thank you

PS: I have already read the wiki entry for plugins, that would be a nice project for the holidays...given there is no coding involved.

Kasenshlogga
Posts: 5
Joined: Thu Jul 18, 2019 1:31 pm

Re: Breaking engines into executable modules

Post by Kasenshlogga » Tue Aug 13, 2019 1:14 pm

criezy wrote:
Mon Aug 12, 2019 5:26 pm
And we had some discussions on our Discord/IRC channel recently about the PSP and possibly PS Vita hitting their limits as well (the Vita currently doesn't use plugins and we have to disable some engines in the daily builds as otherwise it crashes). The PSP for example only has 32 Mb of memory (or 64 Mb on some models). The Dreamcast doesn't even have that much (it has 16 Mb or RAM i believe). As you can see the Raspeberry Pie zero is actually pretty high-end compared to some other platforms we support :wink:
Yeah but then I wonder are there actually people who use ScummVM on such ancient platforms. I guess the PSP is still a nice way to play IF you can find one with a battery that still works. On the Dreamcast it's nice to have, but also kinda silly these days with all the alternatives available.

User avatar
MusicallyInspired
Posts: 1029
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: Breaking engines into executable modules

Post by MusicallyInspired » Tue Aug 13, 2019 1:16 pm

The Nintendo DS port is no longer updated and is unsupported. But the functionality was made out of its necessity at the time. It doesn't make sense to remove a feature like this just because there doesn't (yet) seem to be a use for it. Especially when it's optional.

Post Reply