Sylfare [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=62226 A synthwave-like background, in a tweetcart <p> <table><tr><td> <a href="/bbs/?pid=105240#p"> <img src="/bbs/thumbs/pico8_wuduhenami-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=105240#p"> A synthwave-like background</a><br><br> by <a href="/bbs/?uid=62226"> Sylfare</a> <br><br><br> <a href="/bbs/?pid=105240#p"> [Click to Play]</a> </td></tr></table> </p> <p>I've seen many demos and cool art made with pico8 on Twitter, so I tried to do something. This is my first tweetcart. There's probably many ways to optimize it more, but at least it works.</p> <p>Press left and right arrows to widen or narrow the road, and up or down arrows to move the horizon.</p> <p>Some values can also be changed in line 3:</p> <ul> <li><code>b</code>: default horizon position</li> <li><code>s</code>: offset between the sun center and the horizon</li> <li><code>p</code>: default road position</li> <li><code>n</code>: amount of horizontal lines</li> <li><code>i+=2</code>: speed of horizontal lines</li> </ul> <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>l=line r=rectfill b=64s=5e=128h=64p=45n=6i=0poke(24364,5)::_::i+=2i%=e r(0,0,h,b,2)r(0,0,h,.6*b,9)r(0,b/3,h,b*.6,8)circfill(h,b-s,20,10)r(0,b,e,e,1)l(0,e,p,b,2)for j=1,n do k=(i+e/n*j)%e x=p*(e-k)/e y=k/e*(e-b)+b l(x,y,h,y,2)end d=btn()p+=d\2%2-d%2b+=d\8%2-d\4%2flip()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>Thanks to <a href="https://www.lexaloffle.com/bbs/?uid=15096"> @ElGregos</a><a href="https://twitter.com/GregosEl/status/1408810475543056384">' way to process</a> which saved me some characters!</p> https://www.lexaloffle.com/bbs/?tid=46213 https://www.lexaloffle.com/bbs/?tid=46213 Mon, 17 Jan 2022 21:50:14 UTC