it's actually my first thing i ever did alone in dbp...
it's a playform engine with a sprite that can move and jump. look at the code plese, is it good enough? what can i add/change? i must tell it was hard at first!
here is the code:
sync on : sync rate 60
backdrop on : color backdrop rgb(0,0,0)
hide mouse
`-----
box 0,0,10,10
get image 1,0,0,10,10
cls
box 0,0,640,5
get image 2,1,1,640,5
cls
xPos=50
yPos=430
High=0
MinJump=0
Jump=1
Speed=5
do
if leftkey()=1 then xPos=xPos-Speed
if rightkey()=1 then xPos=xPos+Speed
if upkey()=1 then MinJump=1
if MinJump=1 then High=High+5
if High > 50 then High=50 : Jump=1 : MinJump=0
sprite 1,xPos,yPos-High,1
sprite 2,0,450,2
gosub Gravitation
sync
loop
`-----
Gravitation:
if Jump=1 then High = High - 2
if sprite collision(1,2) then Jump=0
return