You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to move my dog through space i.e. make the grass background move forward to give the illusion of the whole scene progressing.
I tried building off of your example code, but can't figure out the code needed to move through space.
Then I tried using this flappy bird game as a base. The sky image does progress forward like I want, but only for a few seconds. It does not go the same speed as my dog and lags behind. I have no idea why or how to fix that.
The text was updated successfully, but these errors were encountered:
You're going to want to draw the image with image() instead of using bg() because image() allows you to change the coordinates of the image. You could try something like:
That's the most straightforward way I can think of. You might want to play around with the bgX increment amount to adjust the speed and the if statement to adjust when the image resets to 0,0. You could also have two images drawn next to each other and once one goes of the screen you can place it to the right of the next image if that makes sense.
I'm trying to move my dog through space i.e. make the grass background move forward to give the illusion of the whole scene progressing.
I tried building off of your example code, but can't figure out the code needed to move through space.
Then I tried using this flappy bird game as a base. The sky image does progress forward like I want, but only for a few seconds. It does not go the same speed as my dog and lags behind. I have no idea why or how to fix that.
The text was updated successfully, but these errors were encountered: