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

Discussion Strange background bug [SOLVED]

H

HenrikoNumberOne

Guest
Edit: SOLVED! I managed to fix the bug by resetting the background every time the room starts up. I did this easily by making a small script;

Code:
background_ID = layer_background_get_id(0);
background_sprite = layer_background_get_sprite(background_ID);

layer_background_destroy(background_ID);
layer_background_create(background_ID,background_sprite);
Hopefully this should make this easier for you if you ever encounter this bug. Cheers!

Hello! I am trying to replicate Earthbound in GMS 2 as a way to practice and learn new things. However, I've encountered this strange issue where the background doesn't seem to be able to keep up?

Here is an image of the issue;


It is very hard to capture because it disappears after a frame or two, which the Windows snip tool really can't react to quickly enough. In the image above you can see the black shadow behind the trees, which is actually the background not being able to keep up with the rest of the game, offsetting it back and forth a few pixels every couple of frames, making everything extremely jittery. The trees above are actually separate objects made to handle the player going behind and in front of them, and those don't move. It's just the background.

Now, if the game was lagging really badly then I could see a reason for this happening, however it still runs at full speed.

I've tried increasing the texture page size to 8192x8192 - no difference whatsoever.

Enabling Clear Viewport Background appears change things - the jittering is gone but now it the screen flashes black. I suspect this has something to do with the bug?

The issue started after I had placed most of the collision objects in the room (there are about 1200 of them in total). This shouldn't be an issue however, as they are not drawn in-game, but maybe I'm wrong here? The room is 3083x3341 in size, and that hasn't been an issue prior to this. Either way, now I'm completely lost!

Any help would be very much appreciated.
Thanks in advance!
- Henriko
 
Last edited by a moderator:
Top