[dead end] How to reduce the .exe file size?

the size of the whole game doesn’t matter, but the exe!
I exported (compiled) from GDevelop directly trough web as a Windows (.zip file). the whole game unzipped is ~230Mb, but from this the .exe is ~100Mb alone! I have to reduce it to below 64 Mb!!
I am interested in all solutions !!! (with explanation, because I’m not a UFO)

Maybe electron took your 100 mb :frowning:

You can try to wrap your html5 game in Build smaller, faster, and more secure desktop applications with a web frontend | Tauri Studio, it’s in really early development but it should work well enough if you really need a quick solution.

1 Like

couldn’t it be more complicated ?!?!?! because I don’t have enough trouble anyway!

You asked for help, I gave you options. Take my advice or leave it, I can’t help you more.

Hey @Gyuszko,

While this isn’t a simple one-time magic pill you can do, I would suggest taking the time to go through your code (if you haven’t already) and finding ways to simplify. For example:

  • combining objects into groups and having one set of events/actions apply to the whole group
  • fewer steps to achieve the same thing
  • perhaps removing elements from your game that are absolutely necessary

My entire game (code, images, music, etc) is only 12MB, so I can’t quite relate to one that’s 230MB. But still, doing things like those listed above have allowed me to shave about 3MB off my game. Is there a reason your game needs to be below 64MB?

1 Like

thank you for constructive post! yes, of course there is a reason.
unfortunately (or not) I do the code as cimple as it can be. so I can’t throw away things. I tried to shorten the code with external events, but only the project save file shrank. the compiled .exe remained exactly the same size :frowning:

the tutorial was terrible, and the top of that, the link to the app is broken.

Hey now I am sure electron take your extra 100 mb…maybe there is no way you can reduce the size :frowning: Expected app bundle size? · Issue #2003 · electron/electron · GitHub

yes, I’m sure too. the 100 Mb the electron itself.

btw what kind of problem you are facing for the extra size?

the SteamDRM cannot be used on files larger than 64 Mb

Oh man! then maybe you are in big trouble for that…did you find any solution for that?

what I figured out after days is: may be I should use other compiler/backager, but I can’t use them :sleepy: all of it created by UFO’s to UFO’s. not for human use…

now I suffer with NW.JS. may be this package the required resources OUTSIDE my .exe. but I can’t figure out yet how to do.

Ok that’s just being rude now. It’s ok not to like a tutorial, but at least try to give constructive criticism instead of just telling the person who created his tutorial that his work is terrible :wink: (especially since you criticize yourself the constructiveness of others posts).

Also, remember that everyone here is helping because they want to. Nobody here owes you professional support, the least you can do to thank them is not insulting the work and research they have done to give you a potential solution to your problem.

Do you really need it though? Nobody will really try to pirate your game, and if they did, trust my experience as a UFO, Steam DRM wouldn’t stop them :wink:

not really need (not mandatory), but I want. I know - Valve itself warn us - that it is not really an anti piracy tool, and I know your opinion on these. and I agree with it.

Actually let me explain, it’s pretty easy to understand. The way steam drm works is by adding on top of the exe some code that launches steam and ask it if the game was bought. If it wasn’t, it crashes the game before it launches.
Now you might have noticed that the project size doesn’t changes the exe. That is because the exe file doesn’t store the code of the game, it is only electron code that launches the code.
If someone tries to hack your game, they will recognize the directory structure as an electron app quickly. They would only have to replace the main exe file with the original electron exe file (that is open source and available to everyone) to remove Steam DRM.

yes I read this in the Steam documentation. this is exactly what I want.

and the second part of your comment. no. the directory/file structure says nothing to humans.
BTW, why do you want to talk me out of it? this is not much, but this is all I can do. I mean I can’t do…

if anyone is still interested in the topic, after several days of research, learning, trying and suffering, now NW.JS recognizes the game and tries to start but the loading screen stops at 99%. so the game is still not playable, but for me it is already a huge step forward to get here.