Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Asteroids | TweetTweetJam6View game page

Asteroids in 560 characters!
Submitted by Kieron Scott (@NerdOfGamers) — 7 days, 11 hours before the deadline
Add to collection

Play game

Asteroids | TweetTweetJam6's itch.io page

How many characters of code did you use?
560

Include your code here, if you'd like to show it off!
function z(i)i[1]=cos(i[5])*i[6]+i[1]%l i[2]=sin(i[5])*i[6]+i[2]%l circ(u(i))end
function g(n,x,y,d)for j=1,n do d=d or 7i={x or l,y or l,d-2,7,rnd(),.2}add(a,i)end end
function c(a,b)return sqrt((b[1]-a[1])^2+(b[2]-a[2])^2)<a[3]+b[3]end
l=128t=64a={}s={}p={t,t,2,5,0,.3}g(9)u=unpack::_::cls()
if(t%l<1)g(1)
b=btn()p[5]-=(b\2%2-b%2)*.02z(p)
if(btn(5)and t%9<1)add(s,{p[1],p[2],1,8,p[5],2})
for b in all(s)do z(b)end
for k in all(a)do z(k)
if(c(k,p))run()
for b in all(s)do
if c(k,b)then del(a,k)del(s,b)
if(k[3]>2)g(3,u(k,1,3))end
end
end
?t,8
t+=1flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet