GameMaker 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.
 
P

Pyrobird

Guest
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.
 
G

Guts

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

Pixel-Team

Master of Pixel-Fu
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?
 
Z

zizi

Guest
I also have the same problem and cannot find a resolved thread anywhere. Anyone help ? please ?! :)
 
Z

zizi

Guest
in the meantime I found the solution in another thread (finally) so hopefully this will be the same fix for others:

Ensure that cameras are enabled and that a camera and view port are defined and enabled in your room's settings.

It would be good to know if Velocity found a fix so we could tag this one as "Solved". I had to look for months before solving this. Today is a good day !
 

yudoc

Member
Other setting that have to check when appear "black screen": if there are more of two rooms confirm which is the "room order", in my project the object was in the second room.
 
the Fixed I found for this is to Put draw_self(); in side the objects You Cant See I put mines in Draw Event.

I found this out when I was working on my gui and press play to test my menu and I couldn't see my char but i could see the draw hp i added to them
 

Erzberger

Member
So just in case anyone is as dumb as me: I was starting out with GameMaker and made a new room, put all my stuff in there and at some point ran the program to test it. Black screen. Turns out I just left the default Room1 in there while working in Room2. The program ran the empty Room1 of course. So I just needed to delete Room1 (or put it in a new order).
 
Top