Introduction:
Back in 2021 there were no sizecoded PICO-8 productions around, because at the time there wasn't a compressed cartridge format available as there was on for example the TIC-80. However given my Byte Battle experience of writing small LUA code (in number of characters) I was hoping that if I was able to write small enough code that the the raw .P8 file format might still offer the possibility of a tiny intro on the PICO-8 Platform.
Intro Development:
The main idea of the intro was to render a series of low-resolution 'tunnel type' effects as a grid of circles.In this case it will draw a series of 32x18 circles which will scale over time to change the overall look of the intro.
The different effects are done by calculating the distance
to center r=(x*x+y*y)/64
and angle a=atan2(x,y)
for each of the circles, which we will then
combine in different ways to make up the patterns over time.
To add a bit to the progression and vibe a title logo will be printed at some points in during the intro's progression.
A minimal form of audio was added by bitbanging the PICO-8 Sound registers.
P8 Cartridge Header Optimisation:
From here I tried to analyze and optimize the raw P8 format by seeing which of the header data could be removed so that the cartridge will still run. After much experimentation, I ended up with the following minimum header of 27 bytes containing the raw LUA code.
pico-8 cartridge
__lua__
Followed by your raw Lua code, so this leaves:
- 101 characters for a 128 byte intro.
- 229 characters for a 256 byte intro.
- 485 characters for a 512 byte intro.
So with that said, here is entire P8 Cartridge code for the intro (including the minimal pico-8 header):
pico-8 cartridge
__lua__
t=0::f::cls()t+=.1p=t/32for y=-9,9do
poke(12869,t%5*13)sfx(1)for x=-16,16do r=(x*x+y*y)/64a=p*atan2(x,y)c=(t-r)%p*2
circ(x*4+64,y*4+64,p/5-sin(({r*y,r,r+a,a})[1+(p&3)]+t),c%5-3)end end
?p&2>0and'picology'or'',49,62,7
flip()goto f
The intro was packaged up and released at the Xenium 2021 demoparty where it won the tiny intro competition.
Conclusion:
Getting a tiny intro within the 256 byte cartridge size was quite challenging back in 2021.
Fortunately in the years following the release of this intro, Zep (the author of PICO-8) noticed the potential of these small demoscene productions and added offical support for exporting tiny / headerless P8.ROM files was officially added to the PICO-8 Fantasy Console.
This feature made the PICO-8 a more viable platform for sizecoding and has resulted in many more tiny intro productions for PICO-8 being released (including ports for most our our TIC-80 work).
For more information, you can check out the intro at demozoo: Picology (2021)