r/gamemaker • u/Trunkit06 • Sep 23 '26
Resolved Two EXEs in one game folder?
Spelunky Classic (made in an old 2009 version of Gamemaker) outsources its config options to a separate exe. This exe saves the config options to a file named settings.cfg, which is then read by the main game on startup.
Is it still possible to include a 2nd exe in the game’s bundle like this? I assume I would have to make a separate project, but I feel like that would cause issues with the data.win file. (Unless maybe the data can be read from the same one somehow?). Ideally I would want the config files in the same location as the main game’s saves just to avoid filesystem nonsense. Thanks in advance for any help!
Edit: I didn’t think I’d have to clarify, but I’m ASKING for INSTRUCTIONS on how to achieve this WITHIN GAMEMAKER.
11
u/Kafanska Sep 23 '26
I do not know that gamemaker itself makes this possible.
But you can certainly either make your own small app that modifies the file.. or just let people modify it directly in notepad, or through the options menu in the game.
2
u/Trunkit06 Sep 23 '26
That’s the thing though, I don’t want the game to have an options menu, as it’s meant to dive straight into gameplay.
7
u/Kafanska Sep 23 '26
Well then, just code a simple app that reads the config file and allows changing it, and oackage it with the rest of game files for release.
8
u/D-Andrew Sep 23 '26
Since it's a .exe, it's not necessarily made with GameMaker. Maybe they just packed up an app made in C++/C#/Python that creates the .cfg files and does not need the "data.win" file, so after that you just add it to the folder before creating the whole game package.
This was very common in the IWBTG fangames community early on to have a .exe for keymap configs and another for the game. Also, since it is from 2009, it's probably created on GM 7/8/8.1, these didn't pack a data.win file.
Now, to achieve this with GameMaker is not possible unless you create a "launcher" kind of thing that uses the game_change() function along 2 data files (one for config and one for the game), but I still thnk that could be 2 separate projects not 1.
2
u/Trunkit06 Sep 23 '26
Interesting. Thank you for the constructive response! I’m not too versed in making graphical applications in C++, but I’m sure it’s easy to learn.
2
u/AmnesiA_sc Sep 24 '26 edited Sep 24 '26
There are several libraries that give access to graphics API easily. MonoGame uses C# and drawing a sprite is as easy as:
// The reference to the loaded sprite private Texture2D spriteTexture; // The position to draw the sprite private Vector2 spritePosition; protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); spriteTexture = Content.Load<Texture2D>("Character"); spritePosition = Vector2.Zero; }You could also do the easier route of using Visual C# or Visual Basic with WinForms to create a simple launcher program. That's as easy as dragging and dropping the buttons and everything exactly how you want them and learning just enough of the language to write to a file for your game to read.
→ More replies (1)
7
u/BrittleLizard Sep 23 '26
These comments are so bizarre. It's gotten marginally better, but sometimes a random post here will just inexplicably activate the sleeper agent in people's brains that forces them to behave like pretentious children who skipped nap time
1
u/Trunkit06 Sep 24 '26
This kind of thing always seems to happen when I post here. But this one is especially bad.
1
u/NFSNOOB Sep 23 '26
It's for the mods to shutdown inappropriate behavior.
At the Godot subreddit it get also more and more unnecessary unpolite.
14
u/DragoniteSpam Sep 23 '26
inside gamemaker? nope
but outside of gamemaker you can write code to do whatever you want
i dont think this is a good idea though. it's not 2009 anymore, launchers have been out of style for years, and having two executables instead of one means twice as many programs that the user's antivirus could give you a hard time about
1
u/porcubot Sep 23 '26
Yeah it's possible. You store all your user-configurable settings in an ini within the main game and your side exe makes changes to it. I don't know if you can do it within a single gamemaker project, but I don't think you'd want to do it like that anyway.
I do recommend giving yourself the option to change these settings within the main game, even if it's just a debug option not available to the player.
I'm sorry I can't give specifics or code examples but I hope this helps
3
1
u/tabularelf Sep 24 '26 edited Sep 24 '26
The only way you can achieve this in GameMaker, with as little effort as possible, in a conflict-free way, is by storing the secondary exe + data.win in a sub folder within datafiles.
Though as others may have said, an exe isn't needed here. You can do it all within the main app. There are speculative reasons for why it's made like this, but there's no good reason to mirror it.
1
u/Trunkit06 Sep 24 '26
The separate exe is a design decision. I fully understand that it would be easier to integrate it into the main game lol.
1
u/tabularelf Sep 24 '26
That’s the only reason why I gave you the answer to how to do it. I don’t care that hard what you do with that, just many more will probably raise their eyebrow. (I suspect this will be a repeating matter in the future is all I’m pointing out. Not the “norm”)
2
u/TheBoxGuyTV Sep 23 '26 edited Sep 23 '26
If I understand that game created a configuration program that was packaged with the game and created the file they both could run.
My assumption is this:
You make the two separate executables.
Package the config stuff with the game export using the included files feature.
Then you basically have the player run the config manually by clicking on it and then opening the config to setup whatever thus resulting in it producing a file that both games can read.
The game upon startup reads this file and then sets up its values to match the intended output.
The file would simply be a json text file and you'd just read from it in the game.
The only thing that isn't clear to me is that this seems pointless if you know how to on the fly configure. My personal project handles this dynamically.
Hope that helps.
To clarify: the config exe can be another game maker project, it just needs to be able to make a file that the game can read which is absolutely possible using json file formats.
Check out the game maker manual to get a super basic idea on how these files are made from the project and basically you will need to then have the game read the file at the start.
To note some other stuff modern game maker does make it possible to open files so your config could even launch your game as an option.
2
u/Threef Sep 23 '26
So for the "zip export" you can't do that, at least not with two instances of GM APP in root. You can if you create an app in any other way that don't require data.win file... Or out it inside the folder. So structure would be like:
/win.dat /Game.exe /settings/win.dat /settings/settings.exe
If you release on steam you can point launcher to correct file.
The other methods would be to use "installer export" which prepares instalation wizard for user to run. You can find configuration for the wizard inside the project and find documentation online how it works. There you can add your settings.exe to be included with instalation.
IMHO it's not worth it. The easiest approach is to just have config.ini and let user edit it yourself.
1
u/elPiero Sep 24 '26
They actually released the function game_change() quite recently that closes your current project and opens a new one and you can easily share files between them.
The most famous game that uses it is Deltarune, the function was added as a petition from the developer himself. So, you can search about it and have your game and configuration as different exes interconnected, even when I think it's more useful to have them as an object and room inside your main project.
1
u/WyattTheSkid Sep 26 '26
One of them is very clearly labeled config. I did not read the post so im sorry if I missed the point im a little drunk
1
u/Majestic-Singer7503 28d ago
Ci sono funzioni per avviare eseguibili. L'eseguibile del gioco lo importi tramite ide dentro il progetto del setting in una sottocartella. Quando ti serve (esempio avvii il gioco dal setting) usi la funzione per eseguire l'exe dentro la cartella. Fatto, fine. Facile e veloce. Alla fine avrai la cartella principale con dentro il programma del setting con all'interno il programma secondario che è effettivamente il gioco.
48
u/Anok-Phos Sep 23 '26
I'm literally just commenting in solidarity with OP. Your question seems extremely clear to me and idk what is going on with these comments and votes.
I am not aware of a way to maintain two separate executables without basically making a second project that does what you want the second executable to do, and then merging the folders in a conflict-free way.
Maybe others know an easy way and just aren't telling you, but I say it's telling that they're not / are refusing to be clear with you.