Hi
I was bored and though i want to make a little game and i did
The Rules :
You control a box with upkey if you not press the upkey button the player cube will fall down.
You goal is to avoid a cube that passes the screen and always do a new randome position if you hit that cube the game will end.
Dont hit the green box in the bottom of the screen! or the game will also end.
NO MEDIA NEEDED
NOTE : This is only tested in dbpro.
*UPDATE* :
I have made a little update
New features:
: Faster enemy cube!
see if you can avoid it now
NEW CODE :
sync on
sync rate 30
make object box 1,5,5,5
scale object 1,5,5,5
color object 1, RGB(255,0,255)
position object 1,0,0,0
make object box 2,10,2,0
color object 2, RGB(0,64,0)
position object 2,0,-7,0
make object box 3,5,5,5
scale object 3,5,5,5
color object 3, RGB(255,0,0)
position object 3,10,0,0
make object box 4,0,30,0
color object 4, RGB(0,0,0)
position object 4,-6,0,0
enemyspeed# = 0.4
speed# = 0.3
sleep 2500
Do
set object collision to boxes 1
set object collision to boxes 3
move object left 3,enemyspeed#
if upkey() = 0 then move object down 1,speed#
if upkey() = 1 then move object up 1,speed#
if object collision(1,2) then sleep 500 : end
if object collision(3,4) then position object 3,6,rnd(5),0
if object collision(1,3) then sleep 500 : end
sync
loop
Here is the
OLD CODE:
sync on
sync rate 30
make object box 1,5,5,5
scale object 1,5,5,5
color object 1, RGB(255,0,255)
position object 1,0,0,0
make object box 2,10,2,0
color object 2, RGB(0,64,0)
position object 2,0,-7,0
make object box 3,5,5,5
scale object 3,5,5,5
color object 3, RGB(255,0,0)
position object 3,10,0,0
make object box 4,0,30,0
color object 4, RGB(0,0,0)
position object 4,-6,0,0
enemyspeed# = 0.3
speed# = 0.3
sleep 2500
Do
move object left 3,enemyspeed#
if upkey() = 0 then move object down 1,speed#
if upkey() = 1 then move object up 1,speed#
if object collision(1,2) then sleep 500 : end
if object collision(3,4) then position object 3,6,rnd(5),0
if object collision(1,3) then sleep 500 : end
sync
loop
Enjoy!
The Nerd