200byteDemoChallenge!

BlitzMax Forums/BlitzMax Programming/200byteDemoChallenge!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

And my last one.... (I promise)...

Avoid the Asteroids in 243 bytes. (Cursors up/down). Final score is given in output at the end.

w=200h=96p=5Graphics w,h;Repeat;Cls;DrawText("Score:"+s,0,0)p:+(1And KeyDown(40))-(1And KeyDown(38))DrawText(">",0,p*8)x:-1y:+Rand(-1,1)If x<0x=25y=Rand(12)s:+1
DrawText("O",x*8,y*8)Flip;Until(x=0 And y=p)Or KeyHit(27)Print "Score:"+s