GMS 2 Game test black screen on launch

Velocity

Member
Hey,

So, after having to muck around with the new functions system, I FINALLY got my game to LAUNCH. However, when I DO launch it, all that comes up is a BLACK screen. Um, I've tried to fit my background sprite to the room EXACTLY. I've sized the views and cameras to fit. I've set the player and opponent's spawn points, and origins, and made them VISIBLE. And I've looked ALL over the internet for the solution to this problem, reading TONS of articles and can't FIND anything. Also I've tried running an OLDER game, and I get the SAME problem, a black screen on launch. I even get the BACKGROUND music with no VISUALS.

Other people have said:
-It might be the graphics card (which I don't know how to resolve)
-That it was a setting in Global Game Settings/Windows/Graphics (This was more in an OLDER version of GameMaker)
-That the views and cameras weren't set correctly in the room
-Something about objects extending OUTSIDE of the room (which my floor and wall objects do)
-Also other people have said to try a demo from the main page, but my demo thumbnails are TINY and I TRIED to download one, but don't know if I DID. Also, since my OLDER GAME doesn't work EITHER anymore (when it used to before) I thought there might not BE a need to try a demo

Anyway that's all I can think of for now.

Is there any way for me to get RID of this black screen and see my background and CHARACTERS?

If you could help me out that would be cool.

Cheers.
 

Velocity

Member
Yeah, so I tried that, making a room and I made an object in it in an instance layer with a sprite attached on a black background and then all I got on launch was a black background. So I changed the background colour to yellow, but then on launch I got a yellow background... but I don’t know what that means
 

Tony Brice

Member
Try toggling the background off in the editor and see if your game is behind it. Then it's just a matter of depth settings.

Also try drawing text on the GUI window and see if that shows up as it'll always be on the very top layer.
 

Velocity

Member
Try toggling the background off in the editor and see if your game is behind it. Then it's just a matter of depth settings.

Also try drawing text on the GUI window and see if that shows up as it'll always be on the very top layer.
Alright so I toggled the view background eye button in the room edit mode and launched it and nothing. Black background. Then I tried DELETING the background layer. Black background. Then I followed a basic GUI tutorial on YouTube. I created a font called fnt_1.Then I made a Create event in my Object, and wrote:

HP = 50

Then I made a Draw GUI Event in my Object and wrote:

draw_text(32, 32, string(HP))
draw_set_font(fnt_one)
draw_set_color(c_red)
display_set_gui_size(1366, 768)

And still it’s just a black or yellow background depending on what colour I set the background to.

Um, also to note, in the room editor now the background is OVER the object. I can see the object’s silhouette, but it must be underneath the background layer. I’m using my phone to message this as for some f*<[!&g reason my laptop hasn’t been getting internet for two days. So I couldn’t check how depth works again in GameMaker while I’m on here. But I just manually set the depth of both my Object, and my background, separately, and tried both of them at 200 and -200 and still all I would get was a black or yellow background. I still can’t figure this out...
 

Nidoking

Member
Why are you setting the font, color, and GUI size AFTER drawing the text to the GUI? You do realize that programs run from top to bottom, yes?
 

Velocity

Member
Why are you setting the font, color, and GUI size AFTER drawing the text to the GUI? You do realize that programs run from top to bottom, yes?
Actually I didn’t. I kind of naively assumed the program reads all the code and sorts it out itself. Shaun Spalding probably said the top to bottom thing in passing in one of his GameMaker tutorials and I probably just forgot over the time that I stopped using GameMaker for a couple years. Anyway the code:

draw_text(32, 32, string(HP))

I moved to the bottom of my lines of code. And I still don’t see any text when I run it. And I still haven’t figured this out.
 

Pyrobird

Member
I was having the same issue and I realized the sprite I had made was under the new "Timelines" folder. I dragged it into the "Sprites" folder and it reappeared when I ran the game.
 

Guts

Member
I was having the same thing happen and it turned out to be the frame rate was too high on the sprites. I was doing the tutorial for Space rock and she has you move the fps to 60 but that caused the screen to black out. So i moved it to 30 and it worked for me. Hope this helps.
 

Velocity

Member
I was having the same issue and I realized the sprite I had made was under the new "Timelines" folder. I dragged it into the "Sprites" folder and it reappeared when I ran the game.
Hey. Nah, I my sprites are all in the sprites folder. Thanks though for the comment.
 

Velocity

Member
I was having the same thing happen and it turned out to be the frame rate was too high on the sprites. I was doing the tutorial for Space rock and she has you move the fps to 60 but that caused the screen to black out. So i moved it to 30 and it worked for me. Hope this helps.
Hey, thanks for the reply. Um, I edited my sprites' frames to 30 frames per second. Then in the Game Options. Then in Preferences General Settings AND Sprite Editor. I even toggled between frames per second and frames per game frame. No luck. Thanks for the comment though anyway.
 
Hey, thanks for the reply. Um, I edited my sprites' frames to 30 frames per second. Then in the Game Options. Then in Preferences General Settings AND Sprite Editor. I even toggled between frames per second and frames per game frame. No luck. Thanks for the comment though anyway.
If your project is small enough, and you don't mind someone having a look, DM me and share a googledrive link or something where I can download the project file. I can diagnose it for you. You can even send the one where you only had one sprite. I assume you're using GMS2.3?
 
Top