• 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.

Legacy GM Slow compile time

N

Noisefever

Guest
Hi guys, my name is Daniel.

I just started to try out Game Maker by making a small test game. And the first thing that really bugs me is that slow compile time for testing my game.
It compiles around 10 seconds for a game with only 3 objects and 1 room. Even if I make only minimal changes. I can't properly test a game with that long compile times, that's ridiculous. That can't be normal, can it!?
I dare not to think of what happens with large projects.
Based on my experience in other engines or programming languages a test run has to start immediately!
What am I doing wrong? How do you test your games?

Thanks and regards, Daniel.
 

GMWolf

aka fel666
10 seconds is a little on the long side, but perfectly reasonable. You totally can test it reasonably... If you are having to run the game very time you make a small change to test it, then there is bad design somewhere.

Besides, GM compiles reasonably fast. Try building a game in java or C, the compile times are quite comparable.
 
N

Noisefever

Guest
No, sorry, that's not true.

I HAVE a Java background and I have programmed two full games in Java before I decided that programming from scratch takes to much time & effort.
Even the clean initial compile does not take 10 seconds. But after that the test runs start almost instantly. At least with an IDE like Netbeans or Eclipse. Because they only recompile what changed and this in the background while you write.

It's easy to say that it's "bad design" if I have to test often. But especially in the beginning that's necessary in my opinion. How do you finetune the behaviour of your objects? I doubt that you do all of that in your head and it is magically right after the first few tries.
In my last game it was absolutely neccessary to try out often if the level is beatable and make small changes if it was not.
This is not meant offensive! But how do you design your games without heavy testing and adjusting?

Regards, Daniel
 
I have been working on my game for 2-3 years. From a fresh start of GMS, It takes between 20-30 minutes to load and compile the game. Once it compiles once though, it can recompile within like 10 seconds. If I make changes to code, it'll recompile that, but it doesn't take long. The part that takes forever is when you change/add a sprite/background. It has to recompile the entire texture page and stuff. To work around that, I try to update sprites backgrounds all at once before testing. Also, I don't test my game every single second. More like after I want to make sure the code works as planned. Or I'll have a checklist of things to code and do. Then I'll code and do them all. Then test my game and go back through the checklist and make notes of what works and what doesn't, etc.
I have 2011 i7 and SSD, 16GB RAM btw
Great program. Easy to get started.
 

GMWolf

aka fel666
How do you finetune the behaviour of your objects? I doubt that you do all of that in your head and it is magically right after the first few tries.
No, I simply use in game controls to change variables. I also use easy to use variables.
For instance, for a platformed game, rather than having gravity and jump impulse variables, in have jump height, jump length and horizontal speed variables. In then use a bit of maths to get the right values.

By combining these two techniques, Its easy.to get the right values in a couple tries. And I can fine tune other aspects at run time.

Because they only recompile what changed and this in the background while you write.
So does GM.

Honestly, 10 seconds is fast enough. It will get slower when you start throwing too many resources at it, but at this point you may want to consider using external resources rather than internal resources.
 
N

Noisefever

Guest
I have been working on my game for 2-3 years. From a fresh start of GMS, It takes between 20-30 minutes to load and compile the game. Once it compiles once though, it can recompile within like 10 seconds. If I make changes to code, it'll recompile that, but it doesn't take long. The part that takes forever is when you change/add a sprite/background.
20-30 minutes for a clean compile!? Oh my god! :eek:
What does Game Maker do? Convert all binaries to its own heavy compressed super optimized and encrypted super format or what? No way I can comprehend that. Is there somewhere an option to turn that binary conversion off and use the original files on disk (because it seems that this is indeed the longest part). And it seems Game Maker does this every time I run the game, if I changed something or not.
Or is it a bad idea to use the internal sprite designer to design sprites? Is it better to load them? Are there some do's and dont's that I haven't discovered jet?
 
N

Noisefever

Guest
@Fel666:

I understand. That's not the way I prefer but it seems obligatory for Game Maker. 10 seconds may be okay for you, for me it's a clear death criterion. If I don't find a way to make the test runs faster I have to look for another tool.
 
N

NPT

Guest
You can't take a one room game with three objects that takes 10 seconds to compile and draw much meaningful conclusions about compile time on larger games.

IE if a 1 room 3 object game compiles in 10 seconds than a 10 room 30 object game will probably take 100 seconds. That's not the way it works.

With a game, any game, there is a significant one time cost of the compiling of the base engine. This cost isn't multiplicative, there are also a few other one time costs of saving the project, loading the tools, etc.

Bottom line, you're jumping to conclusions trying to extrapolate compile times for a small project to a large project, yse it will be larger but not linearly. If you want to get a better feel start creating a more significant project.

Another thing you will have to accept is using a full blown engine will have a much higher compile time than more traditional environments. But......

I decided that programming from scratch takes to much time & effort.
The time you save developing in Studio will easily make up some of the time lost in longer compile times.
 
N

Noisefever

Guest
@NPT:

You are absolutely right and I don't think that the compile time is growing linearly, no worry! But of course I'm afraid that the compile time IS growing when the game becomes (significant) larger. And aside from growing the current compile time is absolutely bad.
Nevertheless I will of course test Game Maker further than 3 objects and one room. I will do a "full" game (even if it's a small one). I did the same with Construct 2 before I decided that it is a very cool engine but do not fit my future needs. And btw: Construct 2 let's test you your game instantly, that's the way I'm familiar with since the beginning of my game making experience. Even AMOS on the Amiga computer (the predecessor to Clik & Play from Clickteam in 1994 or so) runned your game instantly.

As far as I see the main reason for the bad compile time is that packing or converting of the bin data into the executable. Right? So storing all data on a SSD might help. I will try that out. Nevertheless this is a major downside I face for the first time. I'm surprised that I am the only one who compails abaout that (it seems).
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
20-30 minutes for a clean compile!? Oh my god! :eek:
Loooool! You're in for a shock when you create a game as big as (for example) Hyper Light Drifter and then compile using the YYC and have to wait for an hour or more for it to compile... :D My game Skein is now pretty massive and takes upwards of 40 minutes to compile using the YYC target (about 40 secs using the VM after the initial cache is built though), This is to be expected however, as it's taking GML and actually converting it into native code.
 
N

Noisefever

Guest
Before you laugh at me, go and try another game engine. Actually I'm testing Construct 2, Godot, Clikteam Fusion. And then tell me how long they need to run your game. I'll tell you: no time!
No idea why you all here trying to defend that compilation (or better TEST) time. I assume because you love Game Maker. It's always that. And that's ok! But for me, looking for a good game engine, this is a major point!

Hell yeah, I will try it further - but laughing at me and trying to ridicule my expectations about a justified compilation time is not helpful!
 

GMWolf

aka fel666
Well, yeah. YYC has always been a little slow. But in most cases VM is good enough to test. Still not instant test like some other engines.

This could actually be a good GMS2 update: have a play button to test the game in the room editor. Though u guess there would be lots of problems with persistency from previous rooms...
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
I wasn't laughing at you at all! Your comment was funny in how it expressed itself (and it used the shock smiley!) so I was just replying in the same tone... no offense meant! And no, I'm not defending compile times at all... Each engine I've used has it's own issues and benefits, you just need to weigh them up before choosing. For me the time saved creating my game in GMS greatly outweighs those 30 seconds I have to wait for it to compile. Oh, and the iirc the devs have said there will be no "test in editor" support due to the way GMS works internally.
 
N

Noisefever

Guest
Ah okay, sorry, had misunderstood that. I apologize!

Of course the compile time isn't that important in a later state of the game. But it is very important in the beginning to finetune and learn how things work (if you don't want to include all that finetuning in the game itself like Fel666). But you are right: each of the game engines has its pros and cons... and it's hard to decide.

Btw: I can't tell how often I had heard devs saying "it's impossible because of whatever" (including myself, because I am a dev in my daily job), if the pressure is high enough they all "suddenly" find a solution ;)
 
N

NPT

Guest
This thread reminds me of when Studio first came out. A whole lot of people complained a lot about Studio's huge compile time relative to GM8's instant "compile time" though I prefer the terminology "prep time" as all GM8 did was simple encryption and stitched it to the back of the GM8 runner.

But what many forgot was the huge game load time that GM8 suffered from as it prepped sound and graphics, and it's much slower execution speed as it tokenized and/or interpreted each statement.

A quick google search for "construct 2 game load time" returns dozens of hits suggest contruct 2 has load time issues :

This suggests a prep time that leaves a lot of game preparation still to be done at compile time.

As much as the OP wants to portray himself as a daily dev and our defending of Game Maker as us fanboying because we love it, simply put he's comparing apples to oranges. And doesn't seem to understand that he is comparing Apples to Oranges.

All of the packages he's mentioned do things very differently and all of them have very different costs. Sometimes the cost is upfront at prep-time, sometimes the cost is at load-time, sometimes the cost is at run-time.

Some of the packages include whole engines that need to prepped.
Some of them do minimal prep-time for later interpretation or JIT compiling.
Some of them organize their graphics into texture pages at prep-time.
Some of them are pure interpreters and perform poorly.

Simply put (again), one can draw no conclusions based on only a 10 second compile time (on a machine that's stats are unknown) on a 3 object source and without considering all that is done and the resulting load and performance times.

There really is nothing to be gained from simply comparing Studio's longer compile time to other packages without consideration of the other qualities.
 
Last edited by a moderator:

GMWolf

aka fel666
Well, perhaps one thing can be done.

If I aint mistaken, GM compiles on a single thread. Perhaps if tasks like texture packing, audio convertion, and compilation was done on different threads, and themselves be multi threaded, we could cut compile times significantly on higher end machines.

I personally find the compile times to be reasonable, if not good. (Currnrently also working on xamarin, java games and OSs, all much slower to compile than GM). So I don't think improving compilation time is a priority l. (Structs and methods please!).
But better compile times would be a very welcome change nonetheless, especially when working on tutorials!
 
N

Noisefever

Guest
As much as the OP wants to portray himself as a daily dev and our defending of Game Maker as us fanboying because we love it, simply put he's comparing apples to oranges. And doesn't seem to understand that he is comparing Apples to Oranges.
Apples to oranges? We are talking about game making tools. In the view of "game making tools" they are all apples. They have of course different approaches. In "apple language": different colors and tastes. I like the easy to use approach of Construct 2. But it is somewhere limited and after almost finishing a game with it I missing scripting the most. So I continue searching for a better tool (for me!). Game Maker seemed very promising until this compile time point. Of course this is a personal preference! And I don't want to talk Game Maker down. Apart from the compile time I like it very much! I just have to see if this works out.
(Just in case you are curious and to show that I not only play around, here is a link to the game I currently finishing with c2: http://daddeldad.de )

The reason to start this thread was not to blame Game Maker. It was just the hope that I doing something wrong because I couldn't believe that it isn't possible to test the game instantly (although I had not much hope). And yes, it bugged me in the very beginning while learning how Game Maker works, that I have to wait so many times just to test little things.

So, to cut this short: Sorry for the inconvenience! I will continue to test Game Maker and make my own conclusions later (without blaming).
But, quite generally, it must be possible to practice criticism (what I have done hereby).

Regards, Daniel
 
N

NPT

Guest
It's unfortunate that you're so focused on a 10 second, three object compile, instead of the importance and influence of some of the essiential elements of game-building, game-loading and game performace.
IE:
  • Compiling to machine code
  • Compiling to a VM
  • Interpreting
  • Image textures

Had you understood them, you would have understand why it truly is an apples-to-oranges comparisons. You might also understand why Construct's Codrova centric dependance is a dead-end path for higher performance on Desktop and mobile platforms.

Good Luck on your search for a Game Engine, but I respectfully suggest that you limit Game Compile time as but one small, low priority data point for Game Engine comparision. Respectfully, using your criteria, Interpretted GWBasic would serve as a better development engine than a C compiler because of its instant run nature.
 
Last edited by a moderator:

GMWolf

aka fel666
Well, you could be doing a couple things wrong...
First of all, an SSD does help.

Also, An antivirus could try scanning what GM does on compile. That got my compile times to run slow. Added GM as an exception and it ran much faster.

Try to edit your sprites as little as possible. Since rebuilding texture pages is a slow process. I like to draw many placeholder sprites in advance, then write lots of code that uses it. I can add an object, test, add object, test... Without having to add sprites and rebuild texture pages.
Then I go in an redraw all of them.
 
N

Noisefever

Guest
@Fel666: Thank you for your help! With using the ssd I'm now down to 3-4 seconds, what is acceptable.

@NPT:
Even if you don't seem to believe it, I'm very aware of that c2 is just a html5 engine with interpreted javascript that has its limitations. That's one reason I search for another tool, but not the main reason. Because in the end it only matters if the game works or not and not if the script is interpreted and slow or if the script is completely compiled and fast. And if for me as developer the workflow is good or not. And of course the compile time is not my only criteria! Another could be, just as an example: why is Game Maker packing all assets into the final executable? And if I have 500MB of assets, will the final executable be >500MB size big?

Respectfully, please stop making quick assumptions about my knowledge or awareness because I put a greater value on fast testing than you. Don't take my preferences personally. We can stop here, thank you for your effort!
 

GMWolf

aka fel666
why is Game Maker packing all assets into the final executable? And if I have 500MB of assets, will the final executable be >500MB size big?
Yes, it will. But that is no big deal. The actual binary packed in the exe won't be.

You also have the option to store your assets externally and load them with code.
 

Tthecreator

Your Creator!
@fell666 yea you CAN do that with resources but for every single image resource, a new texture page is created
 

GMWolf

aka fel666
@fell666 yea you CAN do that with resources but for every single image resource, a new texture page is created
Store your external sprites as texture pages, and a texture atlas. Then build vertex buffers using he texture atlas to get the UV information.
 

Tthecreator

Your Creator!
Store your external sprites as texture pages, and a texture atlas. Then build vertex buffers using he texture atlas to get the UV information.
Would be a good solution, but would require some work. yea I could cut down the compile time, but it's easier from the IDE anyways and I do have gm on a ssd so you won't see me using such a solution any time soon.
 
N

NPT

Guest
@Fel666: Thank you for your help! With using the ssd I'm now down to 3-4 seconds, what is acceptable.

@NPT:
Even if you don't seem to believe it, I'm very aware of that c2 is just a html5 engine with interpreted javascript that has its limitations. That's one reason I search for another tool, but not the main reason. Because in the end it only matters if the game works or not and not if the script is interpreted and slow or if the script is completely compiled and fast. And if for me as developer the workflow is good or not. And of course the compile time is not my only criteria! Another could be, just as an example: why is Game Maker packing all assets into the final executable? And if I have 500MB of assets, will the final executable be >500MB size big?

Respectfully, please stop making quick assumptions about my knowledge or awareness because I put a greater value on fast testing than you. Don't take my preferences personally. We can stop here, thank you for your effort!
If you are going to draw poor conclusions, create a topic criticizing Studio based on poor methods, then expect your methods and credibility to be challenged.
 
Last edited by a moderator:

Yal

šŸ§ *penguin noises*
GMC Elder
You're two and a half years late to the train, just saying. The guy that had the original question isn't even a member anymore.

upload_2019-9-10_22-18-16.png
 
Top