how about a little space invaders?
SET DISPLAY MODE 800,600,32
`make it so that you can refresh the screen manually
SYNC ON
HIDE MOUSE
`stops the camera from reseting each time you place a new object
AUTOCAM OFF
`make it so that any random values used are different each time you play the game
RANDOMIZE TIMER()
`MAKE SOME ENEMIES
FOR ENEMY=100 TO 109
MAKE OBJECT BOX ENEMY,1,1,0 : COLOR OBJECT ENEMY,RGB(200,20,20)
MAKE OBJECT COLLISION BOX ENEMY,-0.5,-0.5,-0.5,0.5,0.5,0.5,1
NEXT ENEMY
`used to position the enemies (x=x position, y=y position)
X=-6.5 : Y=5
FOR ENEMY=100 TO 109
POSITION OBJECT ENEMY,X,Y,0 : INC X,3
`if enemy gets too far along move them down and back to the left
IF ENEMY=104 THEN X=-5 : Y=4
`make the bottom line of enemies a different colour
IF ENEMY>104 THEN COLOR OBJECT ENEMY,RGB(20,200,20)
NEXT ENEMY
`you
make object box 1,3,1,0 : color object 1,rgb(255,255,0) : MAKE OBJECT COLLISION BOX 1,-1.5,-0.5,-0.5,1.5,0.5,0.5,1
posx# = 0 : EY=1 : TIME=TIMER()
position camera 0,0,-10 : point camera 0,0,0
do
`makes it so that the enemies move every 2 seconds
IF TIME-TIMER()<-2000 THEN GOSUB MOVE_ENEMIES
IF SPACEKEY() AND FIRING=0 THEN FIRING=1 : WAIT 100 : GOSUB FIRING
`move player right
if rightkey() = 1 and posx# < 6.5 then posx# = posx# + .05
`move player left
if leftkey() = 1 and posx# > -6.5 then posx# = posx# - .05
`update the player's position
position object 1,posx#,-5,0
`if player is firing
IF OBJECT EXIST(2)
if bullet hasn't reached its full distance
IF BULLETY>0
POSITION OBJECT 2,OBJECT POSITION X(2),OBJECT POSITION Y(2)+1,0 : DEC BULLETY
FOR ENEMY=100 TO 109
`if enemy exists and bullet exists
IF OBJECT EXIST(ENEMY) AND OBJECT EXIST(2)
`what happens if player shoots an enemy
IF OBJECT COLLISION(2,ENEMY) THEN DELETE OBJECT ENEMY : DELETE OBJECT 2 : FIRING=0 : SCORE=SCORE+25
ENDIF : NEXT ENEMY
ELSE
`if bullet has not collided but has moved to top of screen
DELETE OBJECT 2 : FIRING=0
ENDIF : ENDIF
`show players score
CENTER TEXT 400,0,"SCORE "+STR$(SCORE)
`if all enemies are dead
IF SCORE=250 THEN END
SYNC : loop
`*****
MOVE_ENEMIES:
FOR ENEMY=100 TO 109
IF OBJECT EXIST(ENEMY)
`move the enemies down
POSITION OBJECT ENEMY,OBJECT POSITION X(ENEMY),OBJECT POSITION Y(ENEMY)-EY,0
`if enemies reach bottom of the screen
IF OBJECT POSITION Y(ENEMY)<-4 THEN GOSUB HIT
ENDIF : NEXT ENEMY
`reset time so that enemies don't keep moving down
TIME=TIMER()
RETURN
`*****
HIT:
END
RETURN
`*****
FIRING:
`make a bullet
MAKE OBJECT SPHERE 2,0.5 : MAKE OBJECT COLLISION BOX 2,-0.5,-0.5,-0.5,0.5,0.5,0.5,1
POSITION OBJECT 2,OBJECT POSITION X(1),OBJECT POSITION Y(1),0 : BULLETY=9
RETURN
the game is really poor to look at and isn't exactly cutting edge but it works and so only needs to be polished off.
p.s. i added plenty of notes so you should be fine, but f u do have any problems feel free to ask.
p.p.s oh, just noticed you said your using dbpro, well this was made in clasic but it will work in pro (i should think).
life's one big game