tuxDB - linux gaming aggregate
TUXDB - LINUX GAMING AGGREGATE
 NEWS TOP_PLAYED GAMES ITCH.IO CALENDAR CHAT WINE SteamDeck
 STREAMERS CREATORS CROWDFUNDING DEALS WEBSITES ABOUT
 PODCASTS REDDIT 

 

SUPPORT TUXDB ON KO-FI

MENU

ON SALE

New Twitch streamer aggregation implemented (#FuckTwitch) due to Twitch's API issues (more info on my Discord )


https://pancelor.itch.io/bubble-cat


welcome back, bubble cat. we have another situation, and this time you've only got 60 seconds

> how to play:

  • arrow keys: move
  • X/Z: continue to next level
  • ctrl-r: restart
  • ctrl-m: mute

you don't have to full-clear every level -- skipping a level without clearing it just gives you a points penalty (-5 per remaining bubble)

> code:

this game was made to fit inside two tweets; i.e. <560 characters of code. here's the full game, in 552 characters: (and no external sprites/sounds)

x=3y=3o={}m=0n=0p=circfill::_::z={}for j=1,13do
z[j]=rnd(49)\1end?"⁶!5f2cC"
while t()<60do?"⁶1⁶c"
b=btnp()q=b>15and"⁷fdc"d=sgn(n-m)u=x
if(n~=m)m+=d d+=6
p(32,32,60-t(),1)v=y?"⁶w⁶t"..m,24,27,4+d
if(b%16>0)s=b*.6&.75
if(not r)r,s=s
if(r)x+=cos(r)y+=sin(r)
w=x\7+y\7~=0
for j=#z,1,-1do
i=z[j]d=q and"-5"b=i\7*9a=i%7*9p(a+4,b+4,3,j|8)
if(y*7+x-x\7==i)w=del(z,i)d="+1"?"⁷d"
if(#z<1)d="+10"q="⁷egc4"
if(d)add(o,{d,a,b,d*11})n=max(n+d)
end?"★⁵8d🐱",x*9+1,y*9+3,7
if(w)x,y,r=u,v
for a in all(o)do
a[3]-=1?unpack(a)
end?q or""
if(q)goto _
end?"⁷dafa"
::e::goto e

> some code highlights:

  • convert btnp() bitfield into movement: b=btnp()if(b>0)s=b*.6&.75if(r)x+=cos(r)y+=sin(r)
  • buffered input: if(not r)r,s=s
  • out-of-bounds check: w=x\7+y\7~=0
  • animated score display: d=sgn(n-m) if(n~=m)m+=d
  • collision checking: if(y*7+x-x\7==i)
  • draw player: ?"★⁵8d🐱",x*9+1,y*9+3,7
  • animated score floaters: for a in all(o)do a[3]-=1?unpack(a) end

> full code history:

https://github.com/pancelor/bubble-cat

thanks for playing!