morgan3d [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=22734 USB NES Controller recommendation? <p>I'd like to use a retro-styled NES USB controller with PICO-8 on Windows &amp; Mac (and Raspberry Pi, eventually). The ones I've found so far on Amazon all have terrible reviews, though. Any recommendations for a good USB retro controller?</p> https://www.lexaloffle.com/bbs/?tid=29908 https://www.lexaloffle.com/bbs/?tid=29908 Sat, 09 Sep 2017 09:33:07 UTC Atomic Pinball <p> <table><tr><td> <a href="/bbs/?pid=41207#p"> <img src="/bbs/thumbs/pico41206.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=41207#p"> Atomic Pinball 0.1</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=41207#p"> [Click to Play]</a> </td></tr></table> </p> <p>Click with the mouse to drop the ball. Physics test doodle for a pinball game.</p> https://www.lexaloffle.com/bbs/?tid=29416 https://www.lexaloffle.com/bbs/?tid=29416 Thu, 01 Jun 2017 08:41:11 UTC Top&#9733;Burn <p> <table><tr><td> <a href="/bbs/?pid=40833#p"> <img src="/bbs/thumbs/pico40832.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=40833#p"> Top*Burn 1.0</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=40833#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is my PICO-1k jam entry. The entire source code is 1024 characters in PICO-8, including the comment at the top. Arrows to fly, button (z on keyboard) to fire.</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> --top*burn a=48n=32k=64_={}camera(-k,-k)c=16x=0y=0t=0o=0g=0q,b,r,s,h=sqrt,btn,rnd,spr,sspr::a::l=t%8/4map(0,0,-k,-k,c,c)for j=3,k do z=j/4h(q(q(z))*c-l,1,k+k,1,-j*n,j,k*4*z,1)end l=l&lt;1o=max(o-1,0)f=b(4)and o&lt;n if f then m(r(3))o+=2 if(o&gt;n)o=98 end i=l and o&gt;n and s(124,-k,-40,4,1)or h(0,56,min(o,n),6,-k,-a),l and t&gt;650or h(a,n,n-t/n,8,n,-a) i=b(1)p=24m=sfx if(i and x&lt;c)x+=2 p=c if(b(0)and-k&lt;x)x-=2 p=c if(b(2)and y&lt;n)y+=1 p=k if(b(3)and-n&lt;y)y-=1 p=74 s(86,x+8,a,4,2) for e in all(_)do e.x+=e.d e.z+=.1 j=e.d&lt;0w=88z=4/e.z if(e.l==0or e.z&gt;k)del(_,e) if(e.l)e.l-=1 j=r(2)&gt;1goto e h(56,k,c,c,e.x*z+24*z,a*z,c*z,c*z,j)w=k if(f and max(abs(u/z-e.x-21),abs(v/z-e.y-8))&lt;8)e.l=8m(3)g+=.75 ::e::h(0,w,56,24,e.x*z,e.y*z,56*z,24*z,j)end if(r(98)&lt;1)d=sgn(r(2)-1)add(_,{x=r(n)-d*k-c,d=d,y=r(k)-a,z=1}) z=.7u=x*z+13v=y*z-8s(2,u,v) if(f and l)s(c,u*.9,v*z)s(17,u,y*z-5)z+=.1 s(38,x*z+10,y*z-2,2,1)z+=.1 s(46,x*z+14,y*z+1,2,1) s(p,x,y,6,3,i)s(240,-30,-41,g,1)flip()t+=1 if(t&lt;999)goto a ::g::s(137+t%2*k,t%192-140,-n,7,1)flip()t+=1 goto g </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=29359 https://www.lexaloffle.com/bbs/?tid=29359 Sun, 21 May 2017 17:42:33 UTC PICO-1K Jam <p>PICO-8 allows 65536 characters, which on one hand is a tight limit for some projects. But, on the other hand, we've seen amazing things from Tweet jam in 140 characters or fewer. </p> <p>That made me wonder...can a whole PICO-8 game be written in 1024 characters (1k)? There are some impressive JavaScript 1k demos. Let's see what we can do!</p> <p>Rules:</p> <ol> <li>Entire program source code lists as 1024 characters or fewer inside PICO-8, including comments.</li> <li>Must be a playable game, not just an animation.</li> <li>No limits on music, sprites, or map, since they don't count toward PICO-8's character limit.</li> </ol> https://www.lexaloffle.com/bbs/?tid=29358 https://www.lexaloffle.com/bbs/?tid=29358 Sun, 21 May 2017 17:33:44 UTC Minimal Jet Fighter <p> <table><tr><td> <a href="/bbs/?pid=38808#p"> <img src="/bbs/thumbs/pico38807.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38808#p"> Minimal Jet Fighter</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=38808#p"> [Click to Play]</a> </td></tr></table> </p> <p>This entire cart is 243 characters (plus six sprites). The code is 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> k,f,q,b=64,0,sqrt,btn x,y=k,k::a::cls(12)for j=3,k do s=j/4 sspr(q(q(s))*16-f%8/4,1,k+k,1,k-j*32,k+j,k*4*s,1)end r=b(1)p=22 if(r)x+=2,p=16 if(b(0))x-=2,p=16 if(b(2))y+=1,p=k if(b(3))y-=1,p=70 spr(28,x+8,99,4,2)spr(p,x,y,6,3,r)flip()f+=1 goto a </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>It was a successful attempt to code the basics of a game in two tweets. There's actually enough room to clamp x and y to the screen. I hope someone will use this as a starter to make a real game.</p> https://www.lexaloffle.com/bbs/?tid=29061 https://www.lexaloffle.com/bbs/?tid=29061 Tue, 28 Mar 2017 01:54:42 UTC Plasma Road <p> <table><tr><td> <a href="/bbs/?pid=38749#p"> <img src="/bbs/thumbs/pico38748.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38749#p"> Untitled</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=38749#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=29055 https://www.lexaloffle.com/bbs/?tid=29055 Sun, 26 Mar 2017 09:54:23 UTC 3D Checkerboard [tweetjam] <p> <table><tr><td> <a href="/bbs/?pid=38747#p"> <img src="/bbs/thumbs/pico38801.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38747#p"> Untitled</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=38747#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's the whole thing:</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> k,i,q=64,0,sqrt cls(1)memset(i,223,k)::a::for y=3,k do s=y/4 sspr(q(q(s))*16-i%8/4,0,k+k,1,k-y*32,k+y,k*4*s,1) end i+=1 flip()goto a </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Leverages memset for the checkerboard, piggybacking off some code for the background rendering in my upcoming PLAT4MER cart.</p> https://www.lexaloffle.com/bbs/?tid=29054 https://www.lexaloffle.com/bbs/?tid=29054 Sun, 26 Mar 2017 08:02:12 UTC @CasualEffects Particle System <p> <table><tr><td> <a href="/bbs/?pid=37439#p"> <img src="/bbs/thumbs/pico37437.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37439#p"> Particle System by @CasualEffects</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=37439#p"> [Click to Play]</a> </td></tr></table> A fast single-pixel particle system using bitwise operations and constant-time addition and removal. The top part of the program is the reusable particle system. It features acceleration, velocity, particle colors, and particle lifetimes. Please reuse, but please also keep my name attached to the code.</p> <p>The bottom part is the waterfall demo and some generic particle emitter code. </p> <p>You can save a few more cycles if you hardcode the gravity constant. Otherwise I believe that this is close to optimal.</p> <p>More information at my <a href="https://github.com/morgan3d/misc/tree/master/p8particle">github</a></p> https://www.lexaloffle.com/bbs/?tid=28831 https://www.lexaloffle.com/bbs/?tid=28831 Mon, 13 Feb 2017 23:08:22 UTC Brick Breaker <p> <table><tr><td> <a href="/bbs/?pid=36161#p"> <img src="/bbs/thumbs/pico36160.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=36161#p"> Brick Breaker 1</a><br><br> by <a href="/bbs/?uid=22734"> morgan3d</a> <br><br><br> <a href="/bbs/?pid=36161#p"> [Click to Play]</a> </td></tr></table> </p> <p>I wrote Brick Breaker as a full-featured, polished PICO-8 sample program. It was an opportunity for me to learn the PICO-8 Lua variant and now stands as a good example program for other programmers new to PICO-8.</p> <p>It demonstrates (commented) use of:</p> <ul> <li>loops</li> <li>create &amp; destroy objects</li> <li>local vars</li> <li>text</li> <li>multiple levels</li> <li>sprite animation</li> <li>powerups</li> <li>particles</li> <li>map usage</li> <li>title screen &amp; game over</li> <li>sound effects</li> <li>music</li> <li>sprite packing</li> <li>basic physics</li> <li>assertions</li> </ul> <p>as well as some techniques for reducing token count, a limited resource on PICO-8.</p> <p>I did most of this work in parallel with the 2017 Global Game Jam. The PICO-8 version of Brick Breaker is based on my <a href="https://casual-effects.com/codeheart/examples/brickbreaker/">JavaScript Brick Breaker</a> sample program, which you can <a href="https://casual-effects.com/codeheart/examples/brickbreaker/play.html">play here</a>.</p> https://www.lexaloffle.com/bbs/?tid=28643 https://www.lexaloffle.com/bbs/?tid=28643 Fri, 20 Jan 2017 21:58:11 UTC