FANDOM


Images
Allgrass

We all know that games with backgrounds that move are fun but HARD to make! So, I'm going to show you how to do it more easily!

So, to start, we need to set the background. If you want it to move, then you HAVE to make one coordinate go off of the character screen. For example:

1:ACLS:BGFILL 0,0,15,100,25,32,9,0,0

This will set a plain grass backround. boring, but you can add. Now if we want it to move...

2:X=0
3:@LOOP
4:BGOFS 0,X,15,5
5:IF BUTTON()==4 THEN X=X-1
6:IF BUTTON()==8 THEN X=X+1
7:WAIT 1
8:GOTO @LOOP

The BGOFS command sets the background to it's X and Y coordinates. X=0 at first, so it always starts at the same place. Lines 5 and 6 are basically saying if the user presses left, the background will go left, and vise-versa. Then it will go back to the label @LOOP, and it will start again.

I hope this helped! This is my first tutorial, so comment any further questions!

(You can add a sprite by the command SPSET 0,64,0,0,0,0 and then SPOFS 0,120,104 for the coords.) Meow.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.