OpenGMK / OpenGMK

A rewrite of the GameMaker Classic engine runners with additional tooling
GNU General Public License v2.0
271 stars 25 forks source link

GM8Emulator to replace the runner EXE? #101

Open donnaken15 opened 3 years ago

donnaken15 commented 3 years ago

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.

0x08088405 commented 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).

Adamcake commented 3 years ago

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.

gm112 commented 2 years ago

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?

0x08088405 commented 2 years ago

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.

0x08088405 commented 2 years ago

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.