'will redraw the green ghost on bg #0 cellx=1 'moving direction and speed celldir=1 'will scroll the entire background layer #1 with the blue ghost moving on it bgx=1 'moving direction and speed bgdir=1 'will move the pink ghost sprite #0 sprx=8 'moving direction and speed sprdir=7/16 'will move green and blue every 15 frames delay=15 do cls bg 0 :pal 0 text 0,3,"cells ''move'' by" text 0,4,"8 pixels on" text 0,5,"the backgroud layer" pal 1 cell cellx,6,1 number cellx,7,cellx,2 bg 0 :pal 0 text 0,9,"background layers" text 0,10,"move by 1 pixels" bg 1 bg fill 1,11 to 18,12 char 2 pal 2 cell cellx,11,1 number cellx,12,cellx,2 scroll 1,bgx, number 1,13,bgx,3 bg 0 :pal 0 text 0,15,"sprites move by" text 0,16,"1/16 of a pixel" sprite 0,sprx,17*8,1 sprite 0 pal 3 pal 3 text sprx/8,18,str$(sprx) dec delay if delay<=0 then delay=15 add cellx,celldir if cellx=1 or cellx=17 then celldir=-celldir add bgx,bgdir if bgx=5 or bgx=-15 then bgdir=-bgdir end if add sprx,sprdir if sprx=120 or sprx=8 then sprdir=-sprdir wait vbl loop #1:MAIN PALETTES 090302080002110000023D0000022D00 0022201F00363534001E190200060504 #2:DEFAULT CHARACTERS 00000000000000000000000000000000 0000006C6C003000007CFEDADAFEFEFE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF