1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

GM:S 1.4 [SOLVED]Game launches with black screen for some people

Discussion in 'Programming' started by Agletsio, Jun 20, 2017.

  1. Agletsio

    Agletsio Member

    Joined:
    Jul 20, 2016
    Posts:
    66
    Hi there,

    I recently submitted a game to an itch.io game jam and some people reported that they only got a black screen when launching the game. They would still hear sounds so it seem it's only the visuals that's the problem.

    I've tested this on five different PC's now (Windows 7 and Windows 10) and it worked on all of them. So currently I'm stumped as to why this is happening, especially considering I can't replicate the problem.

    Any help or guidance would seriously be appreciated!

    P.S.
    Not sure if this is posted in the right forum? Let me if I should move it somewhere else.
    Also, let me know if I should include the build in question.
     
  2. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    What you should do (if you can) is to obtain what is the hardware they are using. Especially the video card I guess, the memory it gives and the windows version.
    The problem looks like they set not handling surface properly. One test you could make with them is to give them a version of your game that doesn't use the application surface and see if the game boots and plays fine.
     
  3. RefresherTowel

    RefresherTowel Member

    Joined:
    Jul 13, 2016
    Posts:
    913
    Is the game fullscreen? I have a weird issue with GM where if I fullscreen a game, I HAVE to have "Use synchronization to avoid tearing" turned on in the Global Game Settings (Under the Windows tab on the top and the Graphics tab on the left). Without that checked, I simply get a black screen when launching into fullscreen mode (doesn't happen if it's windowed though). Very annoying.
     
  4. Agletsio

    Agletsio Member

    Joined:
    Jul 20, 2016
    Posts:
    66
    Hi thanks for the suggestions @RangerX and @RefresherTowel,

    I'll see what info I can gather and report back.

    @RangerX I've looked into the application surface and it does seem that using the app surface could cause poor performance "on some older devices and specific chipsets", according to Game Maker documentation.

    @RefresherTowel Yes the game launches in fullscreen. I've found the setting you're mentioning and mine wasn't ticked, so this could potentially be the culprit.

    I'm including build link to build, if you can check it out and let me if you get the black screen error then maybe I can test my issue with you too?
    https://sleepingsafari.itch.io/astropunk-history-repeats-itself

    Thanks
     
  5. DividingByZero

    DividingByZero Member

    Joined:
    Jan 31, 2017
    Posts:
    485
    I don't have any advice other than testing on their hardware -

    I have had quite a few problems with drawing to surfaces between multiple hardware types and still haven't really sorted it all out.

    EDIT: I just tested the game and it works great for me on Radeon Firepro W7100 graphic chipset.
     
    Agletsio likes this.
  6. Matt Hawkins

    Matt Hawkins Member

    Joined:
    Jan 29, 2017
    Posts:
    205
    Try clicking the "Clean Project Asset Compiler Cache" button before you create your application.
    Its the icon that looks like a broom to the right of the "Run Game" button.
     
  7. hdarren

    hdarren Member

    Joined:
    Jun 21, 2016
    Posts:
    256
    I am seeing this too from people when in fullscreen mode.
     
    Agletsio likes this.
  8. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    Do you know that if you don't turn it off yourself, you ARE using the application surface? Its the surface GMS uses by default to display your game at all. I will try your game tonight but you should test asap with someone who's already having the problem. Test being making an executable of your game that doesn't use the application surface and see what happens for them.
     
    Agletsio likes this.
  9. RefresherTowel

    RefresherTowel Member

    Joined:
    Jul 13, 2016
    Posts:
    913
    I just tried it and I get the black screen. I don't know if that build has my suggestion turned on or not, but it looks exactly the same as if it didn't.
     
    Agletsio likes this.
  10. Klemen

    Klemen Member

    Joined:
    Jun 22, 2016
    Posts:
    10
    This has been occurring to some of my users as well, seems random, I can't see a connection to any specific hardware. A workaround that has been effective for me so far is going to properties of the executable and enabling compatibility mode for windows 8.

    I would love to find a proper solution though, I've seen this reported in many threads and for a variety of bigger GM titles.
     
    Agletsio likes this.
  11. Kenjiro

    Kenjiro Member

    Joined:
    May 21, 2017
    Posts:
    346
    Hibba dibba da dibba do.
     
    Last edited: Jul 2, 2017
    Klemen and Agletsio like this.
  12. Agletsio

    Agletsio Member

    Joined:
    Jul 20, 2016
    Posts:
    66
    Hi everyone, thanks for the input!

    I've enabled the "synchronization to avoid tearing" option, I have a strong feeling that this might be the culprit as one of the players who reported this problem was running Windows 10.

    Here's dropbox link to new build (can't seem to attach file to GM community posts). Haven't shared something with dropbox in a while, so let me know if it's working.:
    https://www.dropbox.com/sh/8plbkkr6183sabt/AABytmr7hqTNCceqKhfsy2xga?dl=0

    @DividingByZero @hdarren Thanks for the feedback!

    @Matt Hawkins Thanks for your suggestion, I've also cleaned the compiler cache before Creating Application with this dropbox build. Rather safe than sorry :)

    @RangerX Yes, I discovered this after some research thanks. Have set button "U" as method to turn it off but then I see it doesn't correct for various aspect ratios (in my case, when i turn it off i get a black screen.). I haven't really got manual aspect ratios under the belt so dealing with that is a bit of an obstacle at the moment. Hoping that the Vsync option will remedy my problem.

    @RefresherTowel Ahh, awesome (not really but it means I can test my problem with you). If you could please check the build in the link above and let me know the result, that would be seriously appreciated!

    @Klemen Thanks for the feedback! Have to agree that it's not ideal though, don't know how many users will actually think of using compatibility mode. As far the reason, @Kenjiro suggestion seems like it might be the answer.

    @Kenjiro Thanks for bringing this to light, I honestly feel like this is the issue!!
     
  13. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    Ok cool, will try tonight or tomorrow as I will be on vacation. yay!
     
  14. Klemen

    Klemen Member

    Joined:
    Jun 22, 2016
    Posts:
    10
    @Agletsio A word of warning, that setting "use synchronization to avoid tearing" has been known to cause performance problems, I've been generally advised to avoid using it.
     
    Last edited: Jun 22, 2017
  15. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    No no no, let's not spread false information like that.
    This option is to turn on v-sync and should equate the same as using "display_reset()" in code. It should NOT be avoided and the black screen this is just a recent bug -- that will be fixed.
    V-sync is a necessity to make your game look professional and avoid image tearing, a very annoying visual infidelity.
    Let's not make GameMaker people think otherwise.


    EDIT: Read your post carefully, you clearly advise the person to avoid using it. Therefore as a side effect could advise someone else. V-sync is not something to avoid.
     
    Last edited: Jun 22, 2017
    Kenjiro likes this.
  16. Klemen

    Klemen Member

    Joined:
    Jun 22, 2016
    Posts:
    10
    Bit harsh, I know what V-sync is and was not discouraging @Agletsio from using the setting, just reporting what others and myself have experienced, I don't see harm in that.
     
    RangerX likes this.
  17. DividingByZero

    DividingByZero Member

    Joined:
    Jan 31, 2017
    Posts:
    485
    @RangerX - Do you have more details on exactly what this bug is related to? I have been having a hell of a time with some surface create, draw, free in my game. Not the same exact situation, but I am wondering if it is related to what you are talking about.
     
  18. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    Hard to tell if your problem is the same thing. Also, the other bug mentionned here is important enough that I would think Yoyo is gonna handle it quickly enough. I don't have any insider info though :p
     
  19. DividingByZero

    DividingByZero Member

    Joined:
    Jan 31, 2017
    Posts:
    485
    I am not trying to hijack this thread (sorry OP), but I am super curious if my issue is related. Basically, my issue is if I have a surface created in an object, draw to it, read pixel data, then free the surface - the next time that object is run, it produced mixed results (maybe hardware related...). Most of the time, though - the surface is returning black on that second pass (so basically, the drawing to it isn't working... I think).

    Anyways - I wasn't sure if you had some specific knowledge that they were looking into this bug (based on a different thread or something?...).
     
  20. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    Sorry, not an expert on surface + shaders
    :/
     
  21. Kenjiro

    Kenjiro Member

    Joined:
    May 21, 2017
    Posts:
    346
    Hibba dibba da dibba do.
     
    Last edited: Jul 2, 2017
  22. Kenjiro

    Kenjiro Member

    Joined:
    May 21, 2017
    Posts:
    346
    Hibba dibba da dibba do.
     
    Last edited: Jul 2, 2017
  23. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,293
    Personally I'm just patching my game to force vsync to be turned on by default (and overwrite the users settings if they had it off). I also added a message to my settings when vsync is highlighted explaining it could cause loss of video to turn off. I hate to lock it on because my game performs so much better without it assuming your eyes are immune to screen tearing like mine. :p
     
    Kenjiro likes this.
  24. RefresherTowel

    RefresherTowel Member

    Joined:
    Jul 13, 2016
    Posts:
    913
    Just tried out the game and it works fine now.
     
  25. Klemen

    Klemen Member

    Joined:
    Jun 22, 2016
    Posts:
    10
    Sigh, lets not bicker about it but it's also mentioned in the documentation. I guess the safest thing to do is what @obscene already suggested.
     
  26. Kenjiro

    Kenjiro Member

    Joined:
    May 21, 2017
    Posts:
    346
    Hibba dibba da dibba do.
     
    Last edited: Jul 2, 2017
  27. DividingByZero

    DividingByZero Member

    Joined:
    Jan 31, 2017
    Posts:
    485
    I think he meant to link to this page:
    https://docs.yoyogames.com/source/dadiospice/002_reference/windows and views/display_reset.html

    vsync, in almost all situations will take more processing power and will reduce performance. I am not speaking about Game Maker only, but all PC games. You will typically get better performance with it off, but the side effect is visual tearing. With it on, if your PC can handle it, will end up with a smoother video performance. And reduced performance doesn't mean that it will be bad, again, if your PC can handle it - it will be smoother and better (in my opinion at least). For example, if your PC is always able to run a game at, lets say, 150 fps - if you enable vsync and have a monitor with a 75Hz refresh rate, your frames will be sync'd to that and capped at 75fps. It will be solid and smooth, no screen tearing. The problem comes up though if you reach a particularly rough scene in the game where your normal, non-vsync, fps would drop to 50fps. Now, you can't sync properly at 75Hz, so it will be reflected more like 37.5fps as it is trying to sync with your monitor's refresh rate.

    There is probably more technical info behind this, but it is my understanding (and experience) with it.
     
    Last edited: Jun 23, 2017
  28. hdarren

    hdarren Member

    Joined:
    Jun 21, 2016
    Posts:
    256
    I can confirm first hand that vsync DOES reduce performance, so Kenjiro definitely needs to do his research before shooting his mouth off.
     
    Last edited: Jun 23, 2017
  29. DividingByZero

    DividingByZero Member

    Joined:
    Jan 31, 2017
    Posts:
    485
    I think there was just a misunderstanding as to what "with the aim to reduce any possible visual lag or stuttering of your game" meant to @Kenjiro. It makes the game smoother, but it typically takes more processing power to achieve that.
     
  30. Kenjiro

    Kenjiro Member

    Joined:
    May 21, 2017
    Posts:
    346
    Hibba dibba da dibba do.
     
    Last edited: Jul 2, 2017
  31. DividingByZero

    DividingByZero Member

    Joined:
    Jan 31, 2017
    Posts:
    485
    Yeah, you are right. I guess the correct way to say it is if your PC runs the game lower FPS than your monitor's refresh rate, your performance will suffer. You need more GPU processing power to play graphically intensive games with vsync on and not get hit by these peformance issues.
     
    Last edited: Jun 24, 2017
  32. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,293
    Installed the update today (after initially just rolling it back).

    Just to clarify my own results, Vsync is required for both fullscreen and windowed modes, but specifically, alternate method seems to be required for windowed mode.

    There seems to be no case in which disabling vsync works properly, unless I'm doing something wrong.
     
    Kenjiro likes this.
  33. Agletsio

    Agletsio Member

    Joined:
    Jul 20, 2016
    Posts:
    66
    Hi everyone,

    Thanks for all the input and feedback! So far it seems that the Vsync option has fixed the problem so setting this thread to "solved" :)
     
  34. Kenjiro

    Kenjiro Member

    Joined:
    May 21, 2017
    Posts:
    346
    That's my observation as well.
     
  35. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,293
    This is the least solved topic there ever was!!!!!!! Requiring Vsync is terrible. You need to just do like I'm doing and encourage everyone to roll back this horrible and pointless windows update and when it asks you why leave an angry and insulting comment.
     
  36. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,571
    It's not fixed and Yoyo should try and fix it but let's not downplay that V-sync turned on is an incredibly easy and good workaround.
    I mean seriously, nowadays the negative impact of v-sync must be felt less often than this Win10 problem. Its take a very bad and old machine to not witness the advantages.
     
  37. Agletsio

    Agletsio Member

    Joined:
    Jul 20, 2016
    Posts:
    66
    @obscene Well, what I meant was that the Vsync option allowed people with black screen error to now see the graphics.

    I'm still very much a beginner when it comes to Game Maker (or game design for that matter). When posting my original question, I didn't expect it to become such a debate. A lot of what was discussed here I don't fully understand, and I can't really encourage anything I don't understand. (Should probably also mention that I use Windows 7).

    Admittedly, I can see that having to use Vsync is an issue. If everyone feels that this topic should not be "solved" then let me know and I'll change it back.
     
    obscene likes this.
  38. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,293
    I was just messing with you. But yeah this issue is upsetting to me as my game is fairly heavy to run and this doesn't make it any easier that I have to force v-sync on or worry about players losing video and not them understanding why. Vsync has been an OPTION on games for like 30 years so this is just so incredibly stupid of Microsoft to take some old, well-working technology and find a brand new way to turn it into a problem, all to benefit some 0.001% of people who might want to stream while playing a game for their 3 Youtube followers and are too stupid to install OBS or some other proper streaming software.
     
    Agletsio likes this.
  39. hogwater

    hogwater Member

    Joined:
    Jun 22, 2017
    Posts:
    635
    Is this fixed in GMS2? I'm on the latest 1.4 and recently completed my first stab at a basic options menu. One of the options I made is turning off vsync (even though the default and my preference is for it to be on).

    Turning it off via my menu while the game is running in fullscreen is fine, but if you save that setting and start the game again you will get the black screen. Sound still playing, game still running.

    -edit: it doesn't seem to happen every time. :(
     
  40. Bingdom

    Bingdom Googledom

    Joined:
    Jul 1, 2016
    Posts:
    1,661
    Is this to do with the windows 10 creators update? If I remember correctly, it doesn't only just affect game maker but other games made in a different engine too. It might be just something to do with windows 10.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice