• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Sprite problems

A

Ash123

Guest
My Sprites wont show!

I am a beginner and I was making one of my first games (Following Shaun Spalding Platformer series) and for some the sprites won't show (and settings were set to "visible", The layer was in front, And the objekt I had was out on the background)

What should I do?

Can anyone please help?

Thx

Ash123
 
T

TheHatter

Guest
would you have any print or code to understand what's going on?
 

FoxyOfJungle

Kazan Games
Is there a room before the one you placed the object in?
Didn't you accidentally click on the sprite offset when creating the sprite and now it is being drawn away?
 

Yal

šŸ§ *penguin noises*
GMC Elder
Here's potential things that could mess it up:
  • setting image_alpha to zero
  • destroying the instance
  • deactivating the instance
  • moving the instance very far away
  • setting the instance's depth so low it ends up behind everything else
  • changing the sprite to something invalid
  • setting image_xscale or image_yscale to zero so the object has no size
  • turning off automatic drawing before the instance's draw event is triggered
  • changing the projection or world matrix
  • switching drawing targets and using the wrong coordinate system
  • cache corruption

There's a lot of stuff you could try, but the most likely to find the problem are:
  • add a show_debug_message("i'm happening") in the object's draw event so you can tell if it's run. If it's not, it's either invisible, deactivated or destroyed.
  • draw a line between the center of the room and the object's position.
    • if the line goes offscreen, the object was moved far away
    • if the line ends at a random position but you can't see the sprite there, it's cache corruption or alpha/scale issues
    • if you don't see a line, the object is invisible, destroyed, or at the wrong depth
 
Top