cls rgb(255,0,0)
get image 1,0,0,32,32,1
cls rgb(0,0,0)
`load image "C:\Users\Dollie\Desktop\2dGame\MainPlayer\playerleft.png",1
for a=1 to 50
make object cube 2+a,10
position object 2+a,rnd(100),rnd(100),rnd(100)
next a
backdrop on
autocam off
sync on
sync rate 60
color backdrop RGB(255,255,255)
sprite 1,320,240,1
make camera 1
x=20
y=40
make object plane 2,1,1
ghost object on 2
INK RGB(255,255,0),RGB(0,0,255)
do
text 1,1,"FPS: " + str$(screen fps())
text 1,10,"x: " + str$(x)
text 1,20,"y: " + str$(y)
position object 2,x,y,1
if leftkey()=1 then x=x-1
if rightkey()=1 then x=x+1
if upkey()=1 then y=y-1
if downkey()=1 then y=y+1
sprite 1,x,y,1
position object 2,x,y,1
position camera 1,object position x(2),object position y(2),-40
sync
loop
This show what I was talking about.
The plane moves about the scenery boxes when the arrows are pressed.
The sprite moves about the screen when the arrows are pressed.
See how the 2 sets of co'ords don't match up?