your job is to BLOT OUT THE SUN with BALLOONS. hop to it, bucko

> controls

  • click and hold to inflate balloons (but don't overinflate!)
  • the balloon you're inflating is fragile -- don't let the others bump it!
  • restart: ctrl-R (or enter for pause menu)
  • mute: ctrl-M

> code

this game was made in 500 characters of code: (and no external sprites/sounds)

q={}u=unpack::_::w=0for i=1,#q do p=q[i]for l=1,2do
p[l]+=p.b*p[l+4]x,y,r,k=u(p)a=mid(r,p[l],128-r)if(a~=p[l])p[l+4]*=-1p[l]=a
circfill(u(p))end?'⧗ᶜ7⁵alしᶜd'..r*r,x-3,y+r-1,k
w+=r*r
for k=i,#q do o=q[k]if((p[1]-o[1])^2+(p[2]-o[2])^2<(p[3]+o[3])^2)o.b*=-1p.b*=-1end end
if(g and g.b<0)❎,g=del(q,g)deli(z and q)?'⁷afd'
x=stat(32)y=stat(33)z=btnp(❎)if(z)g=add(q,{x,y,0,rnd(16)&11,0,0,b=1})
do if(g)g[2]-=1g[3]+=1if(btn()<1)g[5]=rnd(4)-2g[6],g=rnd(4)-2?'⁷i7ce',0,0
end?w,60,2,7
?'★⁶1⁶cc⁶!5f2d3',x,y
goto _

> some code highlights

  • use a loop to move and check wall-bouncing along each axis separately: for l=1,2do p[l]+=p[l+4]
  • p8scii balloon tails! ?'⧗ᶜ7⁵alし'
  • colliding toggles each balloon's bounce direction, and toggling twice is a no-op, so save 2 chars by making each balloon collide with itself every frame: for k=i,#q instead of for k=i+1,#q
  • possibly the worst line of code I've ever written? but hey, it makes the balloons pop: if(g and g.b<0)❎,g=del(q,g)deli(z and q)?'⁷afd'
  • squash two shorthand ifs and a shorthand print all on the same line by force of sheer hope; I believe the parser is basically just impressed at my audacity here. do if(g)...if(btn()<1)...?... <newline> end
    • this doesn't work without the do-end
    • this will likely not work in future versions of pico8
    • if this does work in the future, I suspect it could be used to break out of pico8's token limit? not sure; I haven't investigated yet

Download

Download
balloonboy-500-windows.zip 1,015 kB
Version 1 Apr 03, 2024
Download
balloonboy-500-linux.zip 767 kB
Version 1 Apr 03, 2024
Download
balloonboy-500-osx.zip 7.5 MB
Version 1 Apr 03, 2024
Download
balloonboy-500-raspi.zip 2.3 MB
Version 1 Apr 03, 2024
Download
balloonboy.p8.png 4.7 kB
Version 1 Apr 03, 2024

Comments

Log in with itch.io to leave a comment.

(+1)

fun!! and awe-inspiring simplicity (and brevity!!)

haha that was great fun! Can’t believe it’s all in 500 characters. 

(+1)

🎈

amazing

(+1)

update

wow i love this. high score 3142!!


this is cool!! i don't think i've ever played a game like this before.

(+2)

great stuff, here's my high score so far: