Play game
Asteroid Destroyer 500's itch.io pageHow many characters of code did you use?
499
Include your code here, if you'd like to show it off!
x,y,h,w,s,d,f,a,sc,t,b,p,c,r=61,57,0,1,0,0,0,0,0,0,btn,pal,circfill,rnd::_::cls()t+=1c(64,64,5,7)
if(b(⬅️))x-=s
if(b(➡️))x+=s
if(b(⬆️))y-=s
if(b(⬇️))y+=s
if(b(❎))s=2p(9,8)else s=1p(9,9)
if(b(🅾️))s=.5p(9,2)if(a==1 and x\1+3==d and y\1+2==f)a=0sc+=10
if(x>122)x=122
if(x<0)x=0
if(y>122)y=122
if(y<0)y=0
if(a==0 and time()%3>.5)a,d,f=1,r(120)\1,r(120)\1
if(a==1)c(d,f,6,5)pset(d,f,7)
if(t%31>29)sc-=1
?sc,10,5,6
?t/30\1 .."/30 s𝘦𝘤𝘰𝘯𝘥𝘴"
if(t>900)goto o
?"◆",x,y,9
flip()goto _
::o::cls()?"s𝘤𝘰𝘳𝘦:"..sc,32,64,7
Leave a comment
Log in with itch.io to leave a comment.
Comments
sometimes the asteroids spawn on the edges of the screen and make it impossible but otherwise pretty good.
Thanks, I already know that sorta of a bug.
Took me a little while to figure out what to do here, but eventually figured it out, and was able to get up to a score of 41. IMO--would be nicer if the positioning was a bit more forgiving.
I tried swapping out
x\1+3==d and y\1+2==f)
for
(x+3-d)^2+(y+2-f)^2<9)
And that feels a bit better to me, though it does use 2 extra characters, you could save them by reformatting your variable declaration to not use comma-separation for numeric values
x=61y=57w=0... uses 11 characters, compraed to x,y,w=61,57,0 which uses 13 (since you just need the =, not two commas per variable).
With that, I was able to score in the 90s. :)
Fun game, though, and nicely done getting it in just 499 characters!
Thanks! :D
Wow. That part about a=1b=2c=3 being shorter than a,b,c=1,2,3 is baking my noodle because I've been writing pico8 with a token reduction mindset this whole time, and clearly just wasting characters on commas.