oh yeah sprite collution is not very good is DBP.
You can tell in this small pong game I made. f1 brings ball back in middle arrows up/down shift/control are movement
Rem Project: Pong
Rem Created: 4/14/2003 3:24:03 PM
Rem ***** Main Source File *****
`Reglar Window
set display mode 800,600,16
set window on
set window size 800,600
set window position 100,50
set window title "Pong V_1.0"
set window layout 0,1,1
`shape maker
sync rate 80
start:
xmove#=6
ymove#=0
`Border========================
ink rgb(200,100,0),1
box 0,0,25,100
get image 1,0,0,25,100
y1=screen height()/2
y2=screen height()/2
wait 2
xc#=screen width()/2
yc#=screen height()/2
Box 0,0,800,20
get image 9,0,0,800,20
sprite 7,0,5,9
sprite 8,0,575,9
ink rgb(255,0,0),1
circle 0,0,10
get image 2,0,0,10,10
wait 2
sprite 4,0,10,3
sprite 5,400,10,3
wait 2
player#=1
`main frame of program
`sync on
do
sprite 1,20,y1,1
sprite 2,750,y2,1
sprite 3,xc#,yc#,2
gosub hit
gosub circlem
gosub controls
sync
loop
controls:
If upkey() then y1=y1+-6
if downkey() then y1=y1+6
if shiftkey() then y2=y2+-6
if controlkey() then y2=y2+6
if scancode()=59
sprite 3,400,300,2
xc#=400
yc#=300
endif
return
circlem:
xc#=xc#+xmove#
yc#=yc#+ymove#
return
`hit command for the ball
`remstart
`remend
hit:
`wall commands bounce equation and back up wall
if xc#<800 and xc#>0 and yc#>-100 and yc#<0
ymove#=ymove#+rnd(2)
else if sprite collision (3,7)
ymove#=ymove#+rnd(2)
else if xc#<800 and xc#>0 and yc#>600 and yc#<700
ymove#=ymove#-rnd(2)
else if sprite collision (3,8)
ymove#=ymove#-rnd(2)
endif
endif
endif
endif
`==============================
if sprite collision(3,1) then xmove#=6
If sprite collision(3,2) then xmove#=-6
if sprite collision(3,1)
if downkey()=1 then leftb=4
if upkey()=1 then leftb=-4
ymove#=leftb
endif
If sprite collision(3,2)
if controlkey()=1 then rightb=4
if shiftkey()=1 then rightb=-4
ymove#=rightb
endif
return
AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR, Windos XP home edition.
-----------------------And a Katana.