sizescape [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=76108 Flowtris: A tiny and gooey action puzzler <p> <table><tr><td> <a href="/bbs/?pid=154240#p"> <img src="/bbs/thumbs/pico8_flowtris-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=154240#p"> flowtris</a><br><br> by <a href="/bbs/?uid=76108"> sizescape</a> <br><br><br> <a href="/bbs/?pid=154240#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Flowtris: A tiny and gooey action puzzler</h1> <p>My 2024 entry for Pico-1k!</p> <p>A simple game in just 1018 compressed bytes of Pico-8 instructions. It combines the expanding goo mechanics from the classic Pipe Dream game with the block-dropping puzzle action of Tetris. Try to make a path for the goo to flow across the bottom before you spill!</p> <h2>Controls</h2> <ul> <li>⬅➡ to move the pending tile</li> <li>⬇ to start the drop</li> <li>⬆ for a quick-drop</li> <li>z/❎: Rotate</li> <li>x/🅾️: Restart after game-over.</li> </ul> <h2>Difficulty modes</h2> <ul> <li>Easy: The edges of the tile also block goo expansion</li> <li>Hard: They do not. Good luck!</li> </ul> <h2>Source code</h2> <p>If pasting this into Pico-8 to check it out, make sure you enter puny font mode (ctrl-p) first.</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>b=112p=&quot;%,%?%,%o%,%?%,%?%,%&quot;g=&quot;z0%,%0お%0&gt;%3%&quot;h=&quot;%,%?%,%か%,%&quot;q=&quot;`&quot;..h..&quot;o4?&quot;..h..&quot;l%2%&lt;&quot;..h..&quot;i%8%9&quot;..h..&quot;f%&gt;%6&quot;..h..&quot;c%𝘥7210%,%0➡️/%0@6%&quot;..g..g..g..g..&quot;𝘥7210%,%0a2@/%01/%6%&gt;%6&quot;..p..&quot;9%8%9&quot;..p..&quot;&lt;%2%&lt;&quot;..p..&quot;?4?&quot;..p..&quot;o&quot;..p..&quot;0&quot;z=0for e=1,277do j=ord(q,e)-35for e=0,j\3do sset(z%b,z\b,j%3)z+=1end end e={{1,0,112},{2,112,108}}d={ord(&quot;`ppppppp\0&quot;,1,9)}d[0]=0y={}for e=0,128do y[e]={}end i={{8,124},{8,124}}f=&quot;&quot;l=&quot;lost&quot;u=true k=0a,r=0,0c=0::e::cls()?&quot;easy&quot;,58,50 ?&quot;hard&quot;,58,58 ?&quot;&gt;&quot;,52,50+c*8 if btnp(2)or btnp(3)then c=c~1end if btnp(5)then flip()goto f end flip()goto e::f::cls()pal({1-c,7,11,139,3,139,11},1)::n::for e=1,999do n,o=rnd(128),rnd(128)m=pget(n,o)if m&gt;2then pset(n,o,(m-2)%5+3)end end w,a,r=unpack(e[#e])s=a\16if u then e[#e][3]+=4if d[s+1]&lt;=r+4then if d[s+1]&lt;16then f=l end d[s+1]-=16u=false k+=1add(e,{rnd(10)\1+3,48,0})end end if#f&gt;0then if btnp(4)then run()end else if btnp(0)and d[s]&gt;=r then e[#e][2]=max(a-16)end if btnp(1)and d[s+2]&gt;=r then e[#e][2]=min(a+16,112)end if btnp(2)then e[#e][3]=d[s+1]-4u=true end if btnp(3)then u=true end if btnp(5)then e[#e][1]=ord(&quot;$%&amp;('*+,)./0-&quot;,w)-35end end if k&gt;1and#i&gt;0then n,o=unpack(deli(i,1))if(d[n\16+1]+16&gt;o or c==1and pget(n,o)==1)and#f==0then f=l?&quot;⁷szc2.g1.e-.ccc&quot; end if n==120and o==120and#f==0then f=&quot;won!&quot;l=f?&quot;⁷sacecegcegc2..c3cc&quot; end if pget(n,o)&lt;1+c then pset(n,o,3)for e in all{{0,1,1},{1,0,#i},{-1,0,#i},{0,-1,#i}}do if y[n+e[1]][o+e[2]]==nil then add(i,{n+e[1],o+e[2]},e[3])y[n+e[1]][o+e[2]]=1end end end end if#i==0and#f==0then f=l end rectfill(a,r,a+16,r+16,0)if#f==0then for e in all(e)do w,v,x=ord(&quot;#%$#$$%$$'$$)$$+$$-$$+$%-%$/$$/$%/%%/%$&quot;,(e[1]-1)*3+1,3)spr(w-35,e[2],e[3],2,2,v==36,x==36)end end rect(0,0,127,127,2)if#f&gt;0then?&quot;&sup2;0ᶜ2you &quot;..f..&quot; press 🅾️ to restart&quot;,8,56 end flip()goto n</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h2>Comments and credits</h2> <p>Thanks go out to Liquidream for hosting the Pico-1k jam, thisismypassword for Shrinko8, and JadeLombax for his <a href="https://www.lexaloffle.com/bbs/?tid=44375">graphics tutorial</a> and tools! Without these people, none of this would have been possible.</p> <h2>Fun tricks</h2> <p>I used JadeLombax's run-length-encoded sprites, but my sprites were larger and simpler than some of the examples that tool is often used on, and the output sprite definition ended up using 281 characters, and had some repeated sub-strings:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>z=&quot;`%,%?%,%か%,%o4?%,%?%,%か%,%l%2%&lt;%,%?%,%か%,%i%8%9%,%?%,%か%,%f%&gt;%6%,%?%,%か%,%c%D7210%,%0➡️/%0@6%z0%,%0お%0&gt;%3%z0%,%0お%0&gt;%3%z0%,%0お%0&gt;%3%z0%,%0お%0&gt;%3%D7210%,%0a2@/%01/%6%&gt;%6%,%?%,%o%,%?%,%?%,%9%8%9%,%?%,%o%,%?%,%?%,%&lt;%2%&lt;%,%?%,%o%,%?%,%?%,%?4?%,%?%,%o%,%?%,%?%,%o%,%?%,%o%,%?%,%?%,%0&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Pulling those out and then composing the sprite data from repeated lets me get that down to 220 characters.</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>o=&quot;%,%?%,%o%,%?%,%?%,%&quot;l=&quot;z0%,%0お%0&gt;%3%&quot;z=&quot;%,%?%,%か%,%&quot;i=&quot;`&quot;..z..&quot;o4?&quot;..z..&quot;l%2%&lt;&quot;..z..&quot;i%8%9&quot;..z..&quot;f%&gt;%6&quot;..z..&quot;c%𝘥7210%,%0➡️/%0@6%&quot;..l..l..l..l..&quot;𝘥7210%,%0a2@/%01/%6%&gt;%6&quot;..o..&quot;9%8%9&quot;..o..&quot;&lt;%2%&lt;&quot;..o..&quot;?4?&quot;..o..&quot;o&quot;..o..&quot;0&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>The other big use of <code>ord</code> was for compressing lookup tables. Each one of the tiles can be rotated and then can be rendered. Before shrinking the code down, this was done with two lookup-tables: </p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>-- To rotate a tile, lookup in this list. States 1,2, and 3 don't rotate, 4 and 5 form a two-state loop, -- and 7,8,9,6 and 11,12,13,10 form two four-state loops rotate={1,2,3,5,4,7,8,9,6,11,12,13,10} -- Render maps from a state to its sprite number, and flipx, flipy values render={ {0,1,0}, {0,0,0}, {2,0,0}, {4,0,0}, {6,0,0}, {8,0,0}, {10,0,0}, {8,0,1}, {10,1,0}, {12,0,0}, {12,0,1}, {12,1,1}, {12,1,0}} -- Rotating code if bntp(5) tile=rotate[tile] -- Rendering code sp,fx,fy = unpack(render[tile]) spr(sp,x,y,2,2,fx,fy)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>After Shrinko8, this uses a total of 196 characters.</p> <p>The <code>ord</code> command can get multiple values from a string, and gets rid of all the extra <code>{},</code> characters by packing the data into a string, which shinks all the above down to just:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>-- Rotate if (btnp(5)) tile=ord(&quot;$%&amp;('*+,)./0-&quot;,tile)-35 -- Render sp,fx,fy=ord(&quot;#%$#$$%$$'$$)$$+$$-$$+$%-%$/$$/$%/%%/%$&quot;,(s[1]-1)*3+1,3) spr(sp-35,s[2],s[3],2,2,fx==36,fy==36)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Which shrinks down to 141 characters, saving 55! The token savings is even more significant, but that didn't matter as much for Pico1k.</p> https://www.lexaloffle.com/bbs/?tid=144241 https://www.lexaloffle.com/bbs/?tid=144241 Sat, 14 Sep 2024 21:11:05 UTC cascade_cascade <p> <table><tr><td> <a href="/bbs/?pid=147174#p"> <img src="/bbs/thumbs/pico8_cascade_cascade-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=147174#p"> cascade_cascade</a><br><br> by <a href="/bbs/?uid=76108"> sizescape</a> <br><br><br> <a href="/bbs/?pid=147174#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Cascade Cascade</h1> <p>A game somewhere in the space between a breakout clone and a puzzle bobble clone, inspired by a half-remembered game I played on an airplane seatback.</p> <h2>Controls</h2> <ul> <li>Aim with left and right arrows</li> <li>Press [x] to fire</li> </ul> <p>Or, as of 2024.04.27, point and click with the mouse to aim and fire.</p> <h2>Rules</h2> <p>This is an endless arcade game. Your goal is to survive by keeping the blocks from reaching the bottom.</p> <ul> <li>Each hit reduces a block's strength by one. When a block's strength reaches zero, it's destroyed.</li> <li>Powerups (white concentric circles) increase the number of balls you can accumulate for your next shot.</li> <li>The number of balls you'll fire next shot is indicated by the combo meter on the right side of the screen. It increases by one-half for each block you hit.</li> </ul> <h2>Updates</h2> <h3>2024.04.27</h3> <ul> <li>Updated collision detection to work a bit better on corner hits</li> <li>Added mouse controls</li> </ul> <h3>2024.04.22</h3> <ul> <li>Initial post!</li> </ul> https://www.lexaloffle.com/bbs/?tid=141907 https://www.lexaloffle.com/bbs/?tid=141907 Tue, 23 Apr 2024 05:22:37 UTC PacLine <p> <table><tr><td> <a href="/bbs/?pid=139778#p"> <img src="/bbs/thumbs/pico8_sizescape_pac_v1-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=139778#p"> sizescape_pac_v1</a><br><br> by <a href="/bbs/?uid=76108"> sizescape</a> <br><br><br> <a href="/bbs/?pid=139778#p"> [Click to Play]</a> </td></tr></table> </p> <p>My first real Pico-8 game, a port of <a href="https://abagames.github.io/crisp-game-lib-11-games/?pakupaku">Paku Paku</a>, a 1D Pacman game by Kenta Cho, with some small changes and added features. </p> <p>I think it's pretty fun, but would appreciate any feedback! Also interested in seeing how high your scores can get. My current best is 8,223.</p> <h1>Controls</h1> <p>Press 'x' to start, and change the direction with the left and right arrows.</p> <p>While the ghost is red, it'll eat you, but if you eat a power pellet, it becomes briefly weak, and you can eat it.</p> <h1>Scoring</h1> <ul> <li>Each basic pellet is worth points equal to your current level.</li> <li>If you eat the ghost when it's weak, you'll get 10 times the current level.</li> <li>After half of the pellets on the current level have been eaten, a fruit will appear, if you eat that fruit, you'll get points equal to 20 times the current level. If you finish eating the pellets on this current level, the fruit will disappear, so be quick!</li> </ul> <h1>Updates</h1> <h2>2024-01-13:</h2> <ul> <li>Made it so ties between the player and the ghost always favor the player.</li> <li>Added a &quot;New High Score!&quot; splash</li> </ul> https://www.lexaloffle.com/bbs/?tid=55660 https://www.lexaloffle.com/bbs/?tid=55660 Mon, 08 Jan 2024 04:09:18 UTC Help Shrinking Tweetcart? <p>Been working on a Tweetcart mimicking the old lines screensavers, and I've managed to get it pretty small--it's about 300 characters when all of the spaces are removed, but now I'm stuck, and can't figure out a way to shrink it any further.</p> <p>Here's where I'm at so far:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>a,b,c,d={},rnd,128,flr for i=1,5 do a[i]={x=b(c),y=b(c),w=b(c),h=b(c),p=d(b(4)),z=d(b(4)),l=i+7,m=mid,t=c} end ::_:: for _=1,1000 do pset(b(c),b(c),0) end for _𝘦𝘯𝘷 in all(a) do d={[0]=1,-1,-1,1} line(x,y,w,h,l) x+=d[p] y+=d[(p-1)%4] w+=d[z] h+=d[(z-1)%4] p,z=x+y!=m(0,x,t)+m(0,y,t)and(p+1)%4or p,w+h!=m(0,w,t)+m(0,h,t)and(z+1)%4or z end flip() goto _</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>This renders a result I'm happy with: </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/76108/lines_0.gif" alt="" /> <p>But it's just ~60 characters too long. :( Any one have any advice or suggestions on ways to reduce it further? I feel like there have to be some minimization techniques I'm missing.</p> https://www.lexaloffle.com/bbs/?tid=55580 https://www.lexaloffle.com/bbs/?tid=55580 Mon, 01 Jan 2024 19:17:30 UTC