hi, not sure i this is the right section but i got a problem with my 2D sprite.
i am able to move the sprite but when the x or y co-ord gets to 360 it will reset to 0 and keep moving...
anyone got any idea why this is happening
code below (bad but im new to Db)
Rem Project: Pong Alpha 0.0.1
Rem Created: Thursday, September 18, 2014
rem Set Display Mode 1280,720,32
backdrop off
sync on
sync rate 60
set image colorkey 255,0,255
Load Image "board.jpg",3
Sprite 3,100,100,3
Paste Sprite 3,(100),(100)
Load Image "PlayerCounter.jpg",1
xpos=250
ypos=115
Sprite 1,xpos,ypos,1
Load Image "PlayerCounter.jpg",2
Sprite 2,250,665,2
Paste Sprite 2,(250),(675)
Set Sprite Priority 1,1
do
Set Sprite Priority 1,1
Paste Sprite 1,(xpos),(ypos)
if rightkey()=1 then xpos=wrapvalue(xpos+1)
if leftkey()=1 then xpos=wrapvalue(xpos-1)
if upkey()=1 then ypos=wrapvalue(ypos-1)
if downkey()=1 then ypos=wrapvalue(ypos+1)
print xpos, " ", ypos
sync
cls
loop
Rem ***** Main Source File *****
Rem ***** Variables *****
Rem ***** Functions *****
Rem ***** Main Source Code *****
Wait Key
MOD EDIT: Better to use code tags.
thanks guys