|
Post by Carl on Mar 13, 2013 18:46:06 GMT
I have been playing mini race and have made some alterations, the game has sound and is only three blocks!
use left and right to guide the bomb to the bottom of the cavern without touching the sides.
9 run for a slow game. 5 seems a good challenge.
listing here
: aud 64 191 42 >port> drop ; : beep 0 69 ic! 71 ic! 7 and 69 ic! ; 27 var $s 32 var $r 9 var $z 5 var seed 0 var sc : end 35 $r ! 24 $s ! ; : df sc @ 100 = if 7 $z ! then sc @ 150 = if 5 $z ! then sc @ 175 = if 3 $z ! then sc @ 200 = if 1 $z ! then sc @ 206 = if 59 $r ! 00 $s ! then ; : rnd seed @ 1= 75 * dup seed ! u* swap drop ; : pause clock i@ + begin dup clock i@ - 0< until drop ;
: score 1 sc +! 0 0 at sc @ . ; : fill 525 0 do 27 emit 21 255 beep loop ; : flash 20 0 do fill cls 0 0 beep loop 8 12 at ." Hit!" 9 $z ! 27 $s ! 32 $r ! ; : fail 21 100 beep 20 pause 21 200 beep 20 pause 0 0 beep 8 12 at ." Failed" 9 $z ! 27 $s ! 32 $r ! ; : nupath 3 rnd 1- + o max 20 min 20 sc @ beep ; 0 var hit : hit? 2dup 25 * + vram + ic@ hit ! ;
: path 24 23 at cr 25 0 do i over < over $z @ + i < or $s @ and $r @ + emit loop 0 0 beep ; : mv swap dup inkey dup 8 = swap 9 = 1 and + + 0 max 24 min dup 12 hit? at 29 emit swap 11 at 32 emit swap ; : win hit @ 35 = if flash then hit @ 59 = if fail then ; : run cls 12 10 0 sc ! begin nupath path mv df score >r over pause r> hit @ 32 = 0 = until win ;
|
|