• 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!
  • 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.

Question - IDE Constant Object Flickering + Project Crashing

Vinsane

Member
Hi everyone,

I'm just wondering if I can get some assistance with one of the most annoying bugs I've encountered so far on GMS2. I've recently finished creating a PC game by the way and didn't have anywhere near as much issues as I am now trying to build to Android but I still had issues with objects flickering.

When I build my game to play it in either VM or Android there is a almost 50% chance of the objects on the screen either not appearing correctly by constantly flickering or not appearing at all.

Depth changes to objects and layers have made no difference.
Clearing the cache has made no difference.
Clearing path temp files in main settings has made no difference.
Starting a new project has made no difference.

To make things worse when I open Game Maker Studio 2 there is a good chance it will just randomly crash on startup, or if I import a sprite or change a timeline setting it crashes completely all at random times.

Has anyone else experienced these issues? I'm trying to make my second game but how can I when the platform is this unstable? Don't get me wrong I absolutely love GMS2 but is actually going on here?
 

Vinsane

Member
The random crashes are pretty common and not unique to yourself, see reports in this thread: https://forum.yoyogames.com/index.php?threads/extremely-unstable.41564/

For the flickering sprites, I've not encountered that myself - can you reproduce it in a small example project?
If not, you'd have to explain how you are actually doing things and give some more info for anyone to be able to help.
Dam that is a brilliant Idea haha, as soon as it happens again I will upload it here and reply to you with the project attached mate.
I deleted the last one out of anger but I'm almost certain I can get it to happen again.

The way I setup my projects now is I have objects that spawn different parts of the GUI.
think of it as

obj_guispawner_scorespawn is placed in the room which then the object performs this task on create

instance_create_depth(1,1,1,obj_guispawner_scorecore)

once this instance is created obj_guispawner_scorecore has the following property.
CREATE Event
depth = 2

DRAW Event
draw_set_font(thefontselected);
draw_text(100, 100, global.score);

that is enough to make it flicker when it renders.

I noticed having a background mainly makes this issue happen, when it is a blank screen it does not flicker. If you need more information let me know but when I get home from work I will get it to flicker again.

Cheers for the response
 

rIKmAN

Member
Dam that is a brilliant Idea haha, as soon as it happens again I will upload it here and reply to you with the project attached mate.
I deleted the last one out of anger but I'm almost certain I can get it to happen again.

The way I setup my projects now is I have objects that spawn different parts of the GUI.
think of it as

obj_guispawner_scorespawn is placed in the room which then the object performs this task on create

instance_create_depth(1,1,1,obj_guispawner_scorecore)

once this instance is created obj_guispawner_scorecore has the following property.
CREATE Event
depth = 2

DRAW Event
draw_set_font(thefontselected);
draw_text(100, 100, global.score);

that is enough to make it flicker when it renders.

I noticed having a background mainly makes this issue happen, when it is a blank screen it does not flicker. If you need more information let me know but when I get home from work I will get it to flicker again.

Cheers for the response
Not sure if that could be the issue, I'll will test your code when I get a home.

If you want obj_guispawner_scorecore to be at a depth of 2, why not just create it at a depth of 2 when you create it using instance_create()?
It doesn't make sense to instance_create it with a depth of 1, and then set the depth to 2 in it's create event.

You should also look at using layers (instance_create_layer), and using the Draw GUI Event instead of the Draw Event.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Just to note... the flickering and non-appearance of stuff sounds like you may have some other things at the same depth which is maybe fighting with the other instance for draw depth. Keep in mind that if you have two instances at the same depth (or on the same layer) there is no way to guarantee the order in which they will be drawn on different hardware. Your best bet is to make sure that everything you want in front has a much lower depth or is on a lower layer than everything else (or use the GUI event, like has been suggested).
 

Vinsane

Member
Thanks for the responses guys, I appreciate it.

rIKmAN, you are correct mate I have no idea why i'm doubling up on instance_depth changes. perhaps that is causing issues! Maybe try and replicate the code at home and see what happens. Because that may be a reason.

Nocturne, that also makes perfect sense. what I'll do is run through each object to ensure they all have individual depths and non-conflicting ones. Maybe somewhere along the lines I've accidentally doubled up on depth numbers.

Let's say a gui object has the same depth as an enemy for instance, what would happen?
Could that cause the flickering?

Regards,
Vince
 
G

GOD-sSs-END

Guest
This may be a long shot, but I encountered the same problem.

Check the sprite to see if you accidentally added a blank frame. If so, delete it, and the flickering will be gone.

You may have already solved the problem. It's been more than a year, after all. But I'm writing this for anyone who comes across. . .
 
B

Belsante

Guest
This may be a long shot, but I encountered the same problem.

Check the sprite to see if you accidentally added a blank frame. If so, delete it, and the flickering will be gone.

You may have already solved the problem. It's been more than a year, after all. But I'm writing this for anyone who comes across. . .
Thank you for this, I was having the same problem because of it, just a blank frame.
 
This may be a long shot, but I encountered the same problem.

Check the sprite to see if you accidentally added a blank frame. If so, delete it, and the flickering will be gone.

You may have already solved the problem. It's been more than a year, after all. But I'm writing this for anyone who comes across. . .
Thanks a lot bro, it was 2 blank frames because I was showing the animation process to somebody and I forgot about them. xD
 
Top