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

GML How I can fix backgrounds lagging behind player?

E

Edwin

Guest
I have this code in Step Event:
Code:
background_x = view_xview;
So it's moving as I need but it lagging behind the view. How I can fix it?

This is how background (sun) moves:
ezgif.com-video-to-gif.gif
 

TheouAegis

Member
Which version of Game Maker? GM8? Move it to tge End Step event. Worst case scenario, you will need to factor in the player's speed as well.

In Studio, you could use the Predraw event.
 
E

Edwin

Guest
Which version of Game Maker? GM8? Move it to tge End Step event. Worst case scenario, you will need to factor in the player's speed as well.

In Studio, you could use the Predraw event.
Thanks. I will try Predraw Event when I will be free.
 

Yal

šŸ§ *penguin noises*
GMC Elder
Also, if you let GM move the view rather than doing it manually, you might wanna consider switching over to controlling it yourself... then you're 100% sure in what order you do things, so you can move the view first and THEN update the background.
 
E

Edwin

Guest
Also, if you let GM move the view rather than doing it manually, you might wanna consider switching over to controlling it yourself... then you're 100% sure in what order you do things, so you can move the view first and THEN update the background.
Thanks for advice. I'll keep it on mind.
 
Top