This was made for Tweet Tweet Jam 6 -- it clocks in at 559 characters.

It's a bare-bones runner; press up to jump. Refresh the page to restart if the RNG is being particularly mean.

Dev notes:
The first couple of lines involve writing 3 1-bit sprites to the graphics memory. In all honesty, it might've been better to just make sprites using PS8CII characters rather than this method -- the cuts I had to make to fit the sprites in alongside everything else were extreme.

Source:

y=128z=16s={{6,1546,2590,7740,5166,7197,6203,3106},{3,13,31,26,15,31,57,32}}for
n=1,4do l=s[n\3+1]for i=1,8do
a=4*(n+z*i-z)r=0
for j=0,7do
if(l[i]>>8*(n&1)>>j&1>0)r+=12>>4*j-12end
poke4(a,r)end end
d=1w=40v=2c=1f={}h=2a=add
for i=0,z do a(f,1)end
::u::
?"\^c0\f7"..c
for i=0,z do l=i*8-h rectfill(l,80,l+8,y,f[c+i])end
s=4d+=.4w+=d
g=w<78and pget(3,w+8)>0if(g)then
w=w\8*8d=0s=1<<(c&1)d-=btn()&4end
if(pget(8,w+7)>0)v=0
spr(s,0,w)h+=v
if(8<h)then
c+=1l=rnd(c)&7h=0
if(l<2)for i=-1,rnd(c\z)do a(f,0)end
a(f,5)a(f,5)
if(l<3 and g)v+=3/y
end
flip()
if(w<y)goto u

Comments

Log in with itch.io to leave a comment.

That's cool that you actually bothered to put an animated sprite in there =). If you want to do something like that more efficiently, though, you can encode at least 6 1-bit pixels per character in a string using the ord() function, you just have to stay in the range between characters 35 and 126 if you don't want a 2-char-per-symbol count on Twitter.

(1 edit)

Using ord() hadn't occurred to me at all -- thanks for the tip! I will definitely keep that in mind for future tweet jams :D
(I might also refactor this entry, but I've spent the last three days obsessing over character counts, so a break would be nice :p)