• 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 Game works WORSE when standalone EXE

H

Hiboshi

Guest
Hi everyone!

This is my first post in these forums. I'm quite a newbie using Game Maker but I'm getting the hang of it pretty quickly.

Some days ago, I crashed my computer and I had to restore it. I was using Windows 8.1 and I thought that, as I had to reinstall an OS anyway, I'd use my gift Windows 10 DVD and install it instead of Windows 8.1.

So, I was back into making my game when I noticed something odd. When the game runs INSIDE Game Maker Studio (so, when I hit the "play" button while working on the project) the game runs at steady 60 FPS, but when I create a "Single Runtime Executable" and (the oddest of all) I close Game Maker Studio, the framerate of the game goes crazy and has lots of slowdowns.

So, to sum up:
- Game executed from inside Game Maker Studio -> Steady 60 FPS
- Single Runtime Executable running while Game Maker Studio is running too -> Steady 60 FPS
- Single Runtime Executable running while Game Maker Studio is closed -> 50-52 FPS and slowdowns

This is driving me crazy, and it also made some strange bugs to appear (I'm trying to fix them).

Does anyone know why could this be happening? This didn't happen in Windows 8.1 and I have tried in my Windows 7 laptop and everything goes ok.

Thanks in advance!
 
Last edited by a moderator:

FrostyCat

Redemption Seeker
I've heard about the cabinet self-extractor used by the single-executable export not working right on Windows 10, but slowing down and causing intermittent non-fatal errors are new to me.

I wonder if you get the same FPS penalty with the zipped executable, or a single-executable export made on a system without Windows 10?
 
H

Hiboshi

Guest
I've tried just now.

A Single Runtime Executable made with Windows 8.1 (one I had from a previous version) still slows down on Windows 10. Zipped executable seems to work fine, so I know what I'll use from now on.

Thanks for the extra info!

EDIT: Sorry, I tested the Zipped executable while I had Game Maker Studio open. If I close it it has the same problems as the SRE.

What the heck is happening?
 

RangerX

Member
What is probably happening is that when you run your game in GameMaker Studio, it probably runs in some "dev mode" and when its the executable, its the final "release mode".
In most engines nowadays you have this principle and there are differences in performance between them. Dev modes are often more powerful or fast in some ways because you actually need to make the game and be able to run something without too much assle. The difference with GameMaker Studio is that this whole thing is transparent to the user apparently. WIth other engines you often choose in which mode you compile the game or create a build.

Anyhow, what this tells you is that you need to optimise your game more so it can keep 60fps in release mode :)
 

gitwalrus

Member
What is probably happening is that when you run your game in GameMaker Studio, it probably runs in some "dev mode" and when its the executable, its the final "release mode".
In most engines nowadays you have this principle and there are differences in performance between them. Dev modes are often more powerful or fast in some ways because you actually need to make the game and be able to run something without too much assle. The difference with GameMaker Studio is that this whole thing is transparent to the user apparently. WIth other engines you often choose in which mode you compile the game or create a build.

Anyhow, what this tells you is that you need to optimise your game more so it can keep 60fps in release mode :)
Usually it is the other way around. That the dev (normally called the debug build) is slower because it has more debugging features built in. This is what makes his case strange. It should be running the same or slower in debug builds but definitely not the other way around.
 
H

Hiboshi

Guest
It's as @gitwalrus says. It doesn't make sense that the standalone executable, outside of the IDE environment runs worse.

I've worked with self made engines (C++) and with devkits. In every case, "dev mode" is always slower than standalone, even when running the game with "Release settings" from Visual Studio (the IDE I commonly use).

That's what's odd with all this and makes me think it's an issue with how Windows 10 is handling things. I've sent a ticket to Yoyogames.

For me, it's not much of an issue as I can always open GM:S and run the game well, but if I send the exe to someone that has Win10 maybe they'll get the same slowdowns...

@RangerX, my game DOES run at 60 FPS in every single computer I have tried (some way less powerful than what I use). Even in my current computer it did when it was in Win8 and it does right now if in Win10 I execute the same standalone exe with Game Maker running in the background or I run the game from within GM.

It's not an issue of performance, the OS is doing something odd
 
Last edited by a moderator:
H

Hiboshi

Guest
I won't be at home until night, I'll try tomorrow and I'll send, but if it is a blank executable with nothing I don't think there will be slowdowns.

Anyway, I'll try. Thanks!
 
H

Hiboshi

Guest
Tried with a blank project. No difference between inside and outside GM.

That must mean it's something I'm using that it's being handled different when GM is on (even running in the background, no need for the project to be open).

I've been optimizing the game, deactivating instances that are not on screen, doing fewer collision checks (I'm using Tile-based collisions). Even then, the game still has slowdowns when played without GM.

I don't understand
 

Surgeon_

Symbian Curator
I once had a very strange issue where the game, when built into a stand-alone .exe, would have very unstable FPS if the system wasn't under a big enough load. Yes, you read that right. I tried running it with Mortal Kombat X running in the background - ran just fine. Without MK or other programs, FPS dropped drastically. I never discovered why this was happening but I found out the problem appeared only with GM's built-in V-Sync enabled. I still have Windows 7 though, but you can still try disabling V-Sync if you're using it (that would also match with a new project having no problems, since new projects have V-Sync disabled by default).

-Surgeon_
 
J

jackhigh24

Guest
i was using tile based collisions some time ago and had the same effect happen to me, so i changed to ds grid collisions instead and the problem went away
 
H

Hiboshi

Guest
@jackhigh24
I changed everything to ds_grid collisions and, while now the FPS counter shows the same number (60 FPS) when I execute the game inside GM environment and outside, there's still a noticeable slowdown.

As before, if I execute the standalone game whith Game Maker in the background, it's the same as if I ran from the IDE.

Anyway, thanks to your tip I've optimized the game A LOT. But this inconsistence bothers me as hell.

@Surgeon_ one of the first things I did was disabling V-Sync. It did nothing, I have it disabled right now.

When I can I'll upload a video so you can see what I'm talking about.

Thanks to all for your help!
 
J

jackhigh24

Guest
ye i bet it did optimize your game as that's what i found out when someone on here showed me how to use them the way i needed, cant thank that person enough but wont say his name as everyone will pester hm, glad it gave you a good boost shame it didn't fix the issue though, it did for me even though i had the exact same issue ran better with ide open weird init. so maybe there is something else that need optimizing in your game as that was the only thing in my game that was not a good choice for what i was doing, but you may have something else that's not as good as doing it with other functions.
 
V

VinnieH01

Guest
Finally someone with the same issue I've had for months. I did submit a bug report in March and now yesterday they asked me to speak to the tech team about this. Hopefully they will be able to fix this.
 
H

heyimdandan

Guest
I've been following this post with some interest and was maybe expecting to see an update. Any progress with your issues. I've recently upgraded from Windows 7 to 10 and I haven't noticed any difference in performance between a GM build and a SRE build. Everything runs at the same speed, though noticably of course 5pice.exe is working over time on a separate processor thread keeping tabs on things. That doesn't seem to impact overall performance on my 2.6Ghz thread the game is running on.
 
V

VinnieH01

Guest
@heyimdandan I've linked this thread to the CTO of GM (hopefully he has read it). It dosen't seem like any real process has been made but he is investegating the issue.
 
T

TypicalHog

Guest
I have the same problem, real FPS is around 500 but when I close game maker my games slows down to 20-30 FPS while real FPS stays the same.
 
R

Rucksack

Guest
I have the same issue on Windows 7.
With GameMaker open, the FPS is 60, just as the room speed, while the real FPS is something over 1000.
With GameMaker closed, the FPS is 50. Exactly 50! The real FPS stays the same. And it can't be because of too many collisions or something, because even in the first room, the menu, where only a few objects exist without any collisions, the FPS is 50.
Did anybody find a solution yet?
 
H

Hiboshi

Guest
It keeps happening, and with the new updates it's even worse, now it gets to 45 FPS in the title screen.

Support made me download a Beta version of Studio, and while the game seems to be more fluid, FPS are far from target.

In Windows 7 and 8 I get 60 FPS even on bad hardware. My game is not even that operation-heavy.

Let's see if this is fixed soon
 
Z

Zacpod

Guest
I'm having the same issue.
Game runs buttery smooth in the dev env, but the standalone runs like crap. Seems like the delta_time variable isn't getting updated properly, either, as using it just makes thing really weird (though again, buttery smooth within GMS)
Disabling vsync helps a little, but not much, and the resulting texture tears are massively headache inducing. :(
 
Z

Zacpod

Guest
Turning on "fast collisions" helped a LOT, but causes other issues - like the collision mask for my spine sprite is half the height it's supposed to be now. But still, better that the horror it was before!
 
The exact same thing happened to me. And what solved the issue was going back to version 1.4.1757 which you can find here:

http://www.yoyogames.com/gamemaker/releasenotes


I am now back to a solid 60fps in compiled .exe files with GameMaker not having to be open.






NOTE: I have not tried going back to version 1.4.1760 (from 1.4.1763), but I also notice that's when "A Very Big Update" happened, so that might be where our issue began. It's just SO nice to be back to a smooth 60fps that I don't want to BUDGE from 1.4.1757 until 2.0 comes out! Even THEN I'll be wary.
 
Last edited:
S

sweetjer

Guest
I am also having this problem, and I concur that it appears to be something messed up in delta_time on the compiler's end. That said, I'm just working off what I'm seeing -- I'm not sure what's actually happening, but my game is behaving how it would if it was running slower than room_speed and delta was not normalized, but only when the IDE is closed...

Anyone else on this thread want to share specs? I'm seeing it on a mid range dell laptop: I've got an i7 6500k 2.5 w/ intel integrated gfx hd 520 4gb vram, 8gb ram, solid state drive. I also have an old AMD I'm going to test on later today. I'll test Matt's solution on it, as well. Glad to hear there's a potential workaround, but obviously not ideal. I'll report back w/ result. In the meantime, has anyone heard from YYG on this yet?
 
S

Santiago

Guest
I opened a support ticket on this. There's also a question in the support board from last week, which you should go upvote: http://help.yoyogames.com/hc/en-us/...s-terribly-wrong-after-an-update-Please-help- hoping that helps speed up resolution.
I´m the guy that made that post. I also found this one: https://forum.yoyogames.com/index.php?threads/compiled-exe-running-at-low-fps.9173/

I tried to comment here the other day but I couldn't because my forum account was new. I also opened a support ticket and they contacted me fairly quickly, but they wanted a 20mb (max) gmz file with the problem. A file I don´t have since my project is bigger, and I couldn't provide without spending a couple of hours updating GM again, then rolling back again, etc. Maybe someone here can have a similar file handy when you contact them.
 
S

sweetjer

Guest
If they get back to me I'll have an example ready. I thought for sure I made a mistake in my code until I found this thread. I guess it tricked me into cleaning up my project a bit, so that's nice.
 
Q

Quantum Entanglement

Guest
I can tell what's happening to me.
If I made (windows 10) a .exe everything works fine.
If I export in .zip the game runs at 50% fps (it seems to see a 60fps in .exe and a 30fps in .zip).

My question is, there's some shadow file installed during the wizard process created from .exe and installed in windows, or it's me? Thank you. :)



Edit P.S.: Also, the splash screen is not showing up anymore. Everything were fine maybe a week ago, now when I compile the game there's no splash screen. I remove it, uploaded another one, tried everything...
 
Last edited by a moderator:

Shut

Member
I'm having the same issue. With GM running I get 60 fps, otherwise I end up getting 45 fps, all while the real fps is about 150. I just tried changing the sleep margin to 10 instead of the default 1 and I'm getting 60 fps now, so that might be another solution for now.
 

Shut

Member
Glad it worked for you, though I'm not completely sure whether the issue is only with sleep margin, while it did solve the fps problem for me as well, it might be a bug too as some mentioned here that going back to version 1.4.1757 fixed the problem.
 
S

sweetjer

Guest
Glad it worked for you, though I'm not completely sure whether the issue is only with sleep margin, while it did solve the fps problem for me as well, it might be a bug too as some mentioned here that going back to version 1.4.1757 fixed the problem.
According to the forum post I linked above (source https://forum.yoyogames.com/index.php?threads/windows-sleep-margin.6212/), it looks like YYG changed the default for sleep margin from 10 to 1 in a fairly recent update, which I'm guessing coincides with the 1.4.1757 rollback solution. If someone who rolled back can confirm that Sleep Margin is set to 10 for them by default then I think we can consider this case closed and hopefully people will find this thread if they encounter this issue in the future.

I'm also wondering if anyone knows the best practice here. Is this happening with 1ms because I'm running a resource light project? Should I increase the sleep margin as my project gets larger? I don't really understand how to optimize this setting for max compliance across environments. The manual (and that thread) suggests it should be 1 and that higher numbers can compromise compliance, but =1 is where I'm seeing stuttering. Perhaps that's where the compiler bug is, but then I'd be expecting more complaints, right? Any thoughts?
 
C

Chowderchu

Guest
I'm also having this problem. It seems like it only effects my local machine that I am developing on (Windows 10,) but if I try to run the installer or standalone on my other system (also Windows 10,) then it runs fine. I hope this is fixed soon- seems like a compiler issue as everyone is saying.

Correction: This actually does effect my other machine now.
 
Last edited by a moderator:
H

Hiboshi

Guest
Ok, after trying A LOT of things and many different computers and chatting with Yoyo support I found a workaround.

First of all, this seems to be an issue with Nvidia drivers in Windows 10. Among all the PCs I tested on, the only ones who gave me problems were NVidia on a Windows 10. The same PC running Windows 7, the game runs smooth. 6-year old PC, the game still runs smooth.

So I figured that Game Maker Studio activates some mode on the GPU or uses another method for rendering or something.

If you go to the Graphics tab, under Windows on Global Game Settings, you'll see a section named "Advanced". Check the "Alternate Synchronization Method", create an exe, restart your PC and without opening GM, test it if it runs well now.

Works for me, but I'd like to know why.

Regards!
 

Attachments

obscene

Member
Glad you figured it out. Sidenote... if you have any frameskipping in your game alt vsync will make your game run too fast. Also you can change method via code if you want to make it an option or test for best performance on the player's system.
 
C

Chowderchu

Guest
Ok, after trying A LOT of things and many different computers and chatting with Yoyo support I found a workaround.

First of all, this seems to be an issue with Nvidia drivers in Windows 10. Among all the PCs I tested on, the only ones who gave me problems were NVidia on a Windows 10. The same PC running Windows 7, the game runs smooth. 6-year old PC, the game still runs smooth.

So I figured that Game Maker Studio activates some mode on the GPU or uses another method for rendering or something.

If you go to the Graphics tab, under Windows on Global Game Settings, you'll see a section named "Advanced". Check the "Alternate Synchronization Method", create an exe, restart your PC and without opening GM, test it if it runs well now.

Works for me, but I'd like to know why.

Regards!
This fix works for me! Thank you!
 

K12gamer

Member
Encountered this same problem...Didn't know what was going wrong. At first I thought it was because I added too many MP3 music files to my game. Glad I found this thread (Using Google).

Will try some of the suggestions listed here.

(Update): (Using suggestions in this thread) I went to Global Game settings...Checked "Alt Sync" and set Sleep to 10ms instead of 1.

Now my game runs as smooth as butter! :)
 
Last edited:
W

Waldemar Lene Chaves

Guest
I thought that it was an unsolved problem until I found this post. Thank you so much!
I tried setting sleep margin to 10 and it worked. I´ll try the alternate synchronization solution too and see what happens.
There was another program in my PC, besides GameMaker, that helped the SRE run smooth. It was Google Chrome. If the browser was open on background, the SRE framerate was fixed. It would be understandable that GameMaker had some effect over the game... but Google Chrome?! That´s weird.
Thank you all for sharing this helpful information.
 
P

ph101

Guest
I just had this issue. Dropped to 22 fps in my 30 fps game which ran at 30 fps no problem in GM. So glad I found this thread. Was at a loss - thanks! Alternate synchronisation method and 10 ms sleep margin worked - this is on windows 10, nvidia 1070.
 
I've had this issue on a Windows ten machine without nvidia, it was using an Intel HD card. For some reason I couldn't find the specifics, but it isn't Nvidia. Just in case it's relevant to anyone trying to solve this problem.

However, the same fixes solved the problem for me.
 
P

ph101

Guest
I find the problem particularly un-nerving - something is clearly going wrong here to require changing these things to run standalone at speeds equivalent to when the system is running gamaker runner. Does anyone still have a ticket open - do we think yyc is going to fix this in 1.4 because it seems a major issue for at least marginal future proofing... my feeling is framerates are still less table with these fixes post export..

edit. I submitted a bug report ticket - if you have this issue maybe you should to becuase seems a serious problem we could be left with using gm 1.4 on win 10 going forward..

edit 2. I have found in my case that that alternate synch solves this without changing sleep margin which can remain at 1 ms.
 
Last edited by a moderator:
M

Mike Cullingham

Guest
Thanks so much for this thread. I was really confused at this behaviour. Changing the "Sleep Margin" from 1 -> 10 worked for me. I didn't need to check the "Alternate synchronization method" checkbox.
 
J

JRLS

Guest
i have the sleep margin on 1, and the "alternate synchronization method" checked.
I compiled the.exe on vista machine.
When i run the .exe on windows 10 machine, it runs too fast!!!

Any ideas?
 
A

AnomalousArcane

Guest
Hate to necro an old thread, but was a solution ever found for this? When I export as a zip in GMS2, the project runs very slowly on a my Win10 machine. (about 1/3 the speed). When I transfer this zip to my Win7 machine, it runs fine. I have set the sleep margin at both 1 and 10, and disabled vsync and have had no luck with either.
 
P

ph101

Guest
It's not vsync its "alternate sync method" that was discussed. Do both systems have same spec?
 

RangerX

Member
Hate to necro an old thread, but was a solution ever found for this? When I export as a zip in GMS2, the project runs very slowly on a my Win10 machine. (about 1/3 the speed). When I transfer this zip to my Win7 machine, it runs fine. I have set the sleep margin at both 1 and 10, and disabled vsync and have had no luck with either.
what's the target FPS of your game? 60fps?
If your game run at 60 fps, have it start with v-sync and alternate synch. Put the sleep margin to the maximum that makes sense for 60fps which is 15.
If this doesn't work, go into your graphic card's settings and look at the video synching options. Disable v-sync or whatever odd synch system that is there. If you have an option like "use the software v-sync", enable that.
 
A

AnomalousArcane

Guest
It's not vsync its "alternate sync method" that was discussed. Do both systems have same spec?
what's the target FPS of your game? 60fps?
If your game run at 60 fps, have it start with v-sync and alternate synch. Put the sleep margin to the maximum that makes sense for 60fps which is 15.
If this doesn't work, go into your graphic card's settings and look at the video synching options. Disable v-sync or whatever odd synch system that is there. If you have an option like "use the software v-sync", enable that.
Thank you both for the info, I managed to get a build out that works on both win 7 & 10. I reset everything to default and let it sit overnight.. The next day I had no issues with it.
I'll chalk it up to GMS2 throwing one of its tantrums, but I the issue arises again I'll definitely give this a shot.

Thank you both for your time!
 
Top