This entire cart is 243 characters (plus six sprites). The code is just:
k,f,q,b=64,0,sqrt,btn x,y=k,k::a::cls(12)for j=3,k do s=j/4 sspr(q(q(s))*16-f%8/4,1,k+k,1,k-j*32,k+j,k*4*s,1)end r=b(1)p=22 if(r)x+=2,p=16 if(b(0))x-=2,p=16 if(b(2))y+=1,p=k if(b(3))y-=1,p=70 spr(28,x+8,99,4,2)spr(p,x,y,6,3,r)flip()f+=1 goto a |
It was a successful attempt to code the basics of a game in two tweets. There's actually enough room to clamp x and y to the screen. I hope someone will use this as a starter to make a real game.
wow! neat Morgan!!
to nitpick a bit, I think the perspective on the checkerboard is not perfect, but it's better than the first version :)
can you exagerate more the perspective?
It's already much better than the Atari ST port of Afterburner I used to play!
I wish I understood this code :( I'd love to do Space Harrier.
Feels slow on my phone and I don't mean framerate. Like a jet should move faster. Perspective is pretty though. Also a ground/floor check so you don't fly under the shadow.
If you're feeling adventurous, the shadow could change a little to accommodate the angle jet during left/right moves.
I messed around a bit with the code to fix the perspective and add more feeling of speed:
k,f,b=64,0,btn x,y=k,k::a::cls(12)for j=6,k do sspr(-k/j-f%9/4,1,128,1,k-j*32,k+j,k*2*j,1)end r=b(1)p=22 if(r)x+=2,p=16 if(b(0))x-=2,p=16 if(b(2))y+=1,p=k if(b(3))y-=1,p=70 spr(28,x+8,99,4,2)spr(p,x,y,6,3,r)flip()f+=1.4 goto a |
[Please log in to post a comment]