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.

Ok, this one is way better, a Frogger clone in 246b! Use the left and right to control the frog, you have ten lives can you make it back and forth?

w=320;h=240;x=160;y=120;s=10;Graphics w,h;While d<1;Cls;y:-10If y<-40 y=h;x=Rnd(40,w-40)
If (f+20>x And f<x+40 And y+80>110 And y<120) f=0;s:-1
d=(s<1);f:+(KeyDown(39)-KeyDown(37))*2;DrawText s,0,0DrawOval f,110,20,20DrawRect x,y,40,80Flip;Wend


Edit:
New version with scoring and escape key just use the right arrow this time. 255 bytes!
w=320;h=240;l=10;Graphics w,h;While (l>0)And KeyHit(27)=0;Cls;y:-10If y<-40 y=h;x=Rnd(40,w-40)
If (f+20>x And f<x+40 And y+80>110 And y<120) f=0;l:-1
If f>w f=0;s:+1
f:+KeyDown(39)*2;DrawText s+" | "+l,0,0DrawOval f,110,20,20DrawRect x,y,40,80Flip;Wend