• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Disable caching of Windows builds (GMS2TEMP)?

S

syscall

Guest
Hello,

I have found that whenever you compile your game in GMS2 for Windows platform, it will compress your game into GameMaker engine-friendly format, .win file, which could then be launched with "Runner" program to run the game.

Each time you compile for Windows platform, a new subfolder is created in GMS2TEMP along with the .win file inside the subfolder.
The .win file is stored in subfolder under (sort the folder list by last created date to find your last compiled):
Code:
%LocalAppData%\GameMakerStudio2\GMS2TEMP
The Runner can be located per runtime you used to compile the game in GMS2:
Code:
%ProgramData%\GameMakerStudio2\Cache\runtimes\runtime-%RUNTIME_VERSION%\windows\Runner.exe
Where "%RUNTIME_VERSION%" is the runtime version you used to compile the game.

After locating the .win file, you could run the game like so:
Code:
Runner.exe -game "%WIN_FILE%"
Where "%WIN_FILE%" is the full path to your .win (Windows-cached compiled game) file.

But, I have a question:
Is there an option to stop GMS2 from automatically creating the cache (subfolders in GMS2TEMP)?
This takes up disk space if you have a game with bunch of resources... If you have any extensions/include files which are copied for Windows, then those files are copied over as well (i.e. DLL files).

More info:
Cool stuff, this can be very useful to recover your lost work.
I have tried performing "Build -> Clean" from GMS2 IDE, but it doesn't seem to cleanup any of those folders.
The whole GMS2TEMP folder is deleted only when you normally close GMS2 IDE.
However, if the system is shutdown unexpectedly (or if you use Task Manager to force-close GMS2 IDE process), then all of those files/folders will remain there! :(

Best regards.
 
Last edited by a moderator:
S

syscall

Guest
I guess I could set custom permissions (ACL) on the GMS2TEMP to stop it...
Or can I?

Ok, I tested it. Apparently you can't compile a game anymore then (I denied all access for the GMS2TEMP folder).
Compiler is now stuck...

It seems this can not be disabled, so it is just how it works?
In that case, I would consider this a bug, GMS2 should check for folder permissions to prevent compiler from being stuck... Or, simply common sense: wrap file I/O operations with error handling, try/catch statement.
 
Last edited by a moderator:

rIKmAN

Member
“I completely blocked access to a folder that GMS2 requires to compile and now it won’t work, it’s a bug!” Lol.

In what situation would a logged in user not have access to those folders, other than specifically going out of their way to deny access / remove permissions or using an overzealous A/V and not adding the required folders to the whitelist?

File it as a bug, but it seems more like human error / human interference to me.
(Use Help > File a Bug in the IDE)

For the caches, look in File > Preferences > General > Paths and you will see tickboxes to enable / disable the cleaning of caches when the IDE closes, I think they are all off by default but don't quote me on that.

If the IDE doesn’t run through it’s shutdown procedure then the caches won’t be cleaned due to the abnormal termination of the program.
GMS2 isn’t a sentient being able to adapt to every eventuality - that’s like moaning that you had a power cut and the game you were playing didn’t save so it must be a bug.
 
Last edited:
Top