Log In  

Cart #38807 | 2017-03-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

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.

P#38808 2017-03-28 01:54 ( Edited 2017-05-09 08:53)

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?

P#38809 2017-03-28 05:25 ( Edited 2017-03-28 09:25)

awesome! this sprite looks familiar :O

P#38810 2017-03-28 10:09 ( Edited 2017-03-28 14:09)

It's already much better than the Atari ST port of Afterburner I used to play!

P#38815 2017-03-28 14:11 ( Edited 2017-03-28 18:11)

I wish I understood this code :( I'd love to do Space Harrier.

P#38816 2017-03-28 14:47 ( Edited 2017-03-28 18:47)

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.

P#38827 2017-03-28 23:58 ( Edited 2017-03-29 03:58)

Nice job! the jet sprites are fantastic

P#38854 2017-03-29 14:43 ( Edited 2017-03-29 18:43)

Nice! This could be the foundation of some great games!

P#40240 2017-05-06 13:08 ( Edited 2017-05-06 17:08)

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
P#40367 2017-05-09 04:53 ( Edited 2017-05-09 08:53)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 05:47:57 | 0.012s | Q:31