Open donnaken15 opened 3 years ago
It would definitely be possible to add, the current loader just tries its best to locate the gamedata, then loads said gamedata (the official runner opens argv[0] as a file and does the same thing, essentially).
Our engine is designed to treat GM8 EXEs like game ROMs. We don't currently have a way to package the engine and a game together. The only easy way to do that (that I can think of) would be to make a custom engine build, with your game file hard-coded into it, and a small patch to main.rs so that it reads from your data instead of an input file.
As for a way to do this without building the whole engine every time... I can't imagine that being possible in any reliable way.
I see that your codebase is Rust. Deno(a javascript runtime similar to NodeJS) uses Rust and bundles itself with JS files to make a single combined EXE, which is a kind of similar scenario to what you're dealing with. See the following code as a reference in how they achieve this. https://github.com/denoland/deno/blob/01adbb1efb116d72dc24843294f335bd63b24b0a/cli/tools/standalone.rs#L97
Maybe this could help with this idea?
The idea I had was to have a build of the runner, the game assets, and then provide a launcher executable for it, so it's pretty close. This also avoids any potential issues with the strong copyleft licence we are using, since the OpenGMK binary would be a separate thing.
It would also be possible to pay homage to GameMaker 8 and just append the game assets to the executable if people really wanted, I don't think anyone on the team would be opposed and an exception could be noted for the licence.
Just found out about these projects pertaining to GameMaker 8 executable stuff and was wondering, since this an 'open source' rewrite of the GM8 runner, would it be possible to take the data from my game compiled with GM8 and put it in the new runner's EXE? And since all games made with 8 have the same EXE and just game data at the end of it.
I also ask because I read the part where it said to run an EXE instead of the data itself, and that persisted when I tried running it.