My entry in #TweetTweetJam, in 554 characters.
Cross four levels of increasingly busy traffic, using only the up and down arrow keys!
This was my first time trying a minimal-code jam-- I read various forum tips but I'm sure there's still some compression to be had. Since the jam rules were to use source code only, no spritesheet/map/sfx data, I had the idea of Poke-ing a basic sprite into memory and then using sspr() and palt() to reuse it in different forms... and a little game evolved from that.
Not a bad Frogger clone. The randomization of the sprites works surprisingly well, and the x and o glyphs actually do kind of look like the frog somehow.=).
One thing I think could really help, though, would be adding left and right movement. I went ahead and added some left/right controls below, if you're interested, just had to remove the "Twaffic" text on screen and condense a bit of the line formatting.
f=63p=poke4 p(132,0x2.2222)p(196,0xcc2.2222)p(260,0xc0c2.2228)p(324,0xccc2.2222)p(388,0x606.0606)p(452,0x60.006) g=1::s::y=123::r::cls()srand(8) for i=1,g*3do z=i*33/g+5l=4+i*3%15pal(2,rnd(9)+7)d=i%2*2-1 x=d*t()*(rnd(50)+9)n=0if(l<8)n=1 for j=0,n do x=(x+j*99)%155-32 sspr(8,0,8,8,x,z,2*l,8,d<0) if abs(x+l+4*d-67)<l-1and abs(z-y+2)<5.5then ?"❎",f,y,8 for i=1,30do flip()end goto s end end end b=btnp()f+=4*(b%4\2-b%2)y+=4*(b%16\8-b%8\4) ?"★ lvl "..g.."/4",63,0,10 ?"⬆️",f,y,11 if y<6then g+=1if(g>4)cls(3)print("win",56,60,7)stop() goto s end flip()goto r
Thanks! Initially I was tight on characters (before I read about the btnp() input trick you show) so didn't have side to side movement, and then sort of liked the additional challenge that added... but since there seems to be room I'll probably add that in (I have to update the hard coded collision-checking slightly as well).
Ok, thanks-- based on that suggestion, here's an alternate version allowing use of all four arrow keys in 557 chars, slightly reworked. However, as implemented, this one allows a sneaky way of cheating your way across the road...
I think I personally prefer the first version-- it's harder but also depends less on fast-tapping of buttons and more on picking the right time to cross each set of vehicles (I find playing on a phone makes fast-tap input hard).
[Please log in to post a comment]