mhughson [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=15406 Tutorial: Additional Sprite Memory <p> <table><tr><td> <a href="/bbs/?pid=63133#p"> <img src="/bbs/thumbs/pico8_gfx_import_example-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=63133#p"> gfx_import_example</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=63133#p"> [Click to Play]</a> </td></tr></table> </p> <p>For my game, Witch n Wiz (<a href="https://www.lexaloffle.com/bbs/?pid=38117#p">https://www.lexaloffle.com/bbs/?pid=38117#p</a>), I implemented as simple technique for loading a secondary spritesheet at runtime. This allowed me to have a fullscreen title graphic, but not use up any of the sprite sheet memory (needed for game sprites and map data).</p> <p>The cart at the top of this post is an ultra simple example of it in use. As you can see, you are able to switch between 2 sprite sheets that would each normally take up the entire sprite memory.</p> <p>Credit for the num2hex function goes to felice (<a href="https://www.lexaloffle.com/bbs/?tid=30910">https://www.lexaloffle.com/bbs/?tid=30910</a>)</p> <h1>Limitations:</h1> <p>You can still only have 128x128 worth of sprites in memory at a time. So this is really best for things like the title screen, or major switches in gameplay (say switching worlds where you don't need any of the original sprites anymore).</p> <p>The runtime code for this is very light in tokens (~100) but the additional sprite sheet is stored as a large (although compressed) string, so that is going to each into your character count and compressed size (around 8000 chars in a typical case, and 25% of the compressed cart limit).</p> <h1>Tutorial:</h1> <h2>1) Export</h2> <p>The first thing you need to do, is export your second sprite sheet into a compressed string format the runtime code expects. To do this, you simply load up this cart in Pico-8:</p> <p> <table><tr><td> <a href="/bbs/?pid=63133#p"> <img src="/bbs/thumbs/pico8_gfx_export-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=63133#p"> gfx_export</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=63133#p"> [Click to Play]</a> </td></tr></table> </p> <p>Fill the sprite sheet with the content you want to dynamically load at run-time, and hit &quot;run&quot;.</p> <p>This will copy the compressed data to your computers clipboard as a string. Paste that somewhere, like notepad.</p> <h2>2) Copy Runtime Code</h2> <p>Next, open up the import example (or view the code here in the broswer):</p> <p> <table><tr><td> <a href="/bbs/?pid=63133#p"> <img src="/bbs/thumbs/pico8_gfx_import_example-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=63133#p"> gfx_import_example</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=63133#p"> [Click to Play]</a> </td></tr></table> </p> <p>There is a small section of code you will need to add to your cart. Everything between &quot;gfx import runtime begin&quot; and &quot;gfx import runtime end&quot;.</p> <p>This is the code here for reference, if you don't want to load up the cart:</p> <div> <div style="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>-- --gfx import runtime begin. -- --copy and paste this into your --game cart. --example usage after &quot;end&quot;. -- -- converts hex string -- to actual number function hex2num(str) return (&quot;0x&quot;..str)+0 end --call this when you want to --load your fullscreen --graphics. --this assumes a compressed --format of &lt;count&gt;..&lt;color&gt;.. function load_stored_gfx(gfx) index=0 for i=1,#gfx,2 do count=hex2num(sub(gfx,i,i)) col=hex2num(sub(gfx,i+1,i+1)) for j=1,count do sset((index)%128,flr((index)/128),col) index+=1 end end end --call this to go back to --the original graphics stored --on the cart. --eg.after displaying title --screen. function restore_gfx() reload(0x0,0x0,0x2000) end -- --gfx import runtime end. --</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h2>3) Paste Export Data</h2> <p>Go an get that string that got exported in step 1, and paste it into your game cart as a variable somewhere.</p> <div> <div style="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>--something like this. --it will be very large, so I just truncated the string in my example here. local my_gfx=&quot;f51d151d151d151d151&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h2>4) Load/Unload As Needed</h2> <p>There are only 2 functions you need to call for the entire library.</p> <p>First, when you want to use the stored graphics, call load_stored_gfx() and pass it your compressed graphics string (eg. my_gfx) in this example.</p> <p>When you are done with it, simply call restore_gfx() to return the sprite sheet to its original form.</p> https://www.lexaloffle.com/bbs/?tid=33758 https://www.lexaloffle.com/bbs/?tid=33758 Sun, 31 Mar 2019 04:18:06 UTC Saint Nick's Dash Away All! <p> <table><tr><td> <a href="/bbs/?pid=59372#p"> <img src="/bbs/thumbs/pico8_biyakigaha-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=59372#p"> Saint Nick's Dash Away All!</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=59372#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Day 1 of the 2018 Pico-8 Advent Calendar!</strong></p> <p><center><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/xmas_rooftop.gif" alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/xmas_rooftop_p8_1.gif" alt="" /><br /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/xmas_rooftop_p8_2.gif" alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/xmas_rooftop_p8_3.gif" alt="" /></center></p> <p>Thanks for checking out my entry for our community &quot;Pico-8 Advent Calendar&quot;!</p> <p>It's a simple &quot;race the clock&quot; arcade game, with the goal of delivering as many presents as possible before sunrise. The entire game only lasts about a minute, with the idea that you will play many times, and try to beat your previous high score.</p> <p><strong>Credits:</strong></p> <p>Design and Code: <a href="https://twitter.com/matthughson"><a href="https://twitter.com/matthughson">https://twitter.com/matthughson</a></a><br /> Art: <a href="https://twitter.com/hoybhoyb"><a href="https://twitter.com/hoybhoyb">https://twitter.com/hoybhoyb</a></a><br /> Sound and Music: <a href="https://twitter.com/gruber_music"><a href="https://twitter.com/gruber_music">https://twitter.com/gruber_music</a></a><br /> 3D FX and Intro: <a href="https://twitter.com/2DArray"><a href="https://twitter.com/2DArray">https://twitter.com/2DArray</a></a></p> <p><strong>About Pico-8 Advent Calender:</strong></p> <p>During December, each day will be filled with new and exciting PICO-8 games! We have gathered 25 great developers from the PICO-8 community and we have worked hard to make some new games. Each day leading up to Christmas, there will be a new surprise for you! </p> <p>Find out more at: <a href="https://pico8-advent.tumblr.com/"><a href="https://pico8-advent.tumblr.com/">https://pico8-advent.tumblr.com/</a></a></p> <p>And check out the Pico-8 Advent Calendar each day for a new suprise: <a href="https://www.lexaloffle.com/bbs/?tid=32388"><a href="https://www.lexaloffle.com/bbs/?tid=32388">https://www.lexaloffle.com/bbs/?tid=32388</a></a></p> https://www.lexaloffle.com/bbs/?tid=32329 https://www.lexaloffle.com/bbs/?tid=32329 Mon, 26 Nov 2018 23:38:44 UTC Super Mario Bros. (Authentic) <p> <table><tr><td> <a href="/bbs/?pid=55702#p"> <img src="/bbs/thumbs/pico56470.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=55702#p"> Super Mario Bros. (Authentic) 0.1.3</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=55702#p"> [Click to Play]</a> </td></tr></table> </p> <p>Uncompressed Source Code: <a href="https://paste.ee/p/5KOG5">https://paste.ee/p/5KOG5</a> (warning: it's pretty gross)</p> <p><center><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/mario_wipp8_3.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/mario_wip_p8_4.gif" width=256 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/mario_wip_p8_6.gif" width=256 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/mario_wip_p8_7.gif" width=256 height=256 alt="" /></center></p> <p>Late last year (2017) I started work on a port of Super Mario Bros [NES] to Pico-8. The goal was to be authentic as possible to the original game, while working within the Pico-8 limitations. Something like Super Mario Bros Deluxe [GBC] (<a href="https://www.mariowiki.com/Super_Mario_Bros._Deluxe">https://www.mariowiki.com/Super_Mario_Bros._Deluxe</a>).</p> <p>In the end I was able to get 1-1 and 1-2 mostly complete before starting to hit serious memory limits which make it seem near impossible to ship the full game. </p> <p>With that in mind, I'm releasing it as-is for now so that people can check it out and see where it was headed.</p> <p>If you are curious, the biggest factor for memory is the level data which is quite huge. At some point I'd like to document how my level authoring process worked, but for now you can check out this twitter thread of me slowly wittling down the level data size:</p> <p><a href="https://twitter.com/matthughson/status/929194247202340864">https://twitter.com/matthughson/status/929194247202340864</a></p> <p><strong>Update:</strong> I have managed to squeeze in all for World 1 now!</p> <p>Music by: <a href="https://twitter.com/gruber_music">https://twitter.com/gruber_music</a></p> https://www.lexaloffle.com/bbs/?tid=31744 https://www.lexaloffle.com/bbs/?tid=31744 Sun, 26 Aug 2018 01:28:23 UTC Stop the Bad Guys! <p> <table><tr><td> <a href="/bbs/?pid=48641#p"> <img src="/bbs/thumbs/pico48640.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=48641#p"> Stop the Bad Guys! 1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=48641#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=30678 https://www.lexaloffle.com/bbs/?tid=30678 Sun, 28 Jan 2018 12:12:21 UTC load test 2 <p> <table><tr><td> <a href="/bbs/?pid=47930#p"> <img src="/bbs/thumbs/pico47932.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=47930#p"> load test 2</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=47930#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=30567 https://www.lexaloffle.com/bbs/?tid=30567 Sun, 07 Jan 2018 01:22:48 UTC load test 1 <p> <table><tr><td> <a href="/bbs/?pid=47926#p"> <img src="/bbs/thumbs/pico47931.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=47926#p"> load test 1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=47926#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=30566 https://www.lexaloffle.com/bbs/?tid=30566 Sun, 07 Jan 2018 01:01:38 UTC Prevent save from changing character case <p>Hi,</p> <p>I am trying to store some binary data as a string in lua, like so:</p> <p>local data=&quot;&atilde;.&ccedil;.G&nbsp;W.&sect;.&Oacute;.&times;...&quot;</p> <p>but after saving, all common ascii characters in this string get moved to lowercase:</p> <p>local data=&quot;&atilde;.&ccedil;.g&nbsp;w.&sect;.&Oacute;.&times;...&quot; --(note: G and W are now g and w)</p> <p>Is there anyway to prevent this?</p> <p>Thanks!</p> https://www.lexaloffle.com/bbs/?tid=30377 https://www.lexaloffle.com/bbs/?tid=30377 Mon, 04 Dec 2017 02:08:58 UTC How to get Camera Position? <p>Is it possible to get the current Camera position stored in the DrawState?</p> <p>I'm writing my own map() function, and want to hook into the built in camera functionality.</p> <p>Thanks!</p> https://www.lexaloffle.com/bbs/?tid=30200 https://www.lexaloffle.com/bbs/?tid=30200 Mon, 06 Nov 2017 20:09:50 UTC Zachary and Matt's Awesome Game <p> <table><tr><td> <a href="/bbs/?pid=39837#p"> <img src="/bbs/thumbs/pico39836.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=39837#p"> Zachary and Matt's Awesome Game 1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=39837#p"> [Click to Play]</a> </td></tr></table> </p> <p>Use arrow keys to move. Eliminate all the enemies.</p> https://www.lexaloffle.com/bbs/?tid=29205 https://www.lexaloffle.com/bbs/?tid=29205 Sun, 23 Apr 2017 00:54:09 UTC Mega <p> <table><tr><td> <a href="/bbs/?pid=38358#p"> <img src="/bbs/thumbs/pico38530.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38358#p"> Mega 0.2</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38358#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38358#p"> <img src="/bbs/thumbs/pico38357.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38358#p"> Mega 0.1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38358#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=28992 https://www.lexaloffle.com/bbs/?tid=28992 Sat, 18 Mar 2017 02:23:26 UTC Witch n' Wiz <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico39947.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 1.0</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p>Art by: 9tk (<a href="https://www.lexaloffle.com/bbs/?uid=23566">https://www.lexaloffle.com/bbs/?uid=23566</a>)<br /> Code by: mhughson (<a href="https://www.lexaloffle.com/bbs/?uid=15406">https://www.lexaloffle.com/bbs/?uid=15406</a>)<br /> Sound by: gruber music (<a href="https://twitter.com/gruber_music">https://twitter.com/gruber_music</a>)</p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_cover.png" width=640 height=640 alt="" /> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_story.gif" width=256 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_story2.png" width=384 height=256 alt="" /></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_rules2.png" width=384 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_rules.gif" width=256 height=256 alt="" /></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_monsters.gif" width=256 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_monsters.png" width=384 height=256 alt="" /></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_objects2.png" width=384 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_objects.gif" width=256 height=256 alt="" /></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_controls.gif" width=256 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_controls3.png" width=384 height=256 alt="" /></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_facts.png" width=384 height=256 alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_facts2.gif" width=256 height=256 alt="" /></p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/witch_notes2.png" width=640 height=256 alt="" /> <p>Previous Versions:<br /> <div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico39706.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 0.15</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico39098.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 0.14</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico39021.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 0.13</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38834.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 0.12</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38770.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 0.11</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38741.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Witch n' Wiz 0.10</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38605.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.9</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38496.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.8</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38398.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.7</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38300.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.6</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38204.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.5</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38172.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.4</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38148.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.3</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38129.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.2</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=38117#p"> <img src="/bbs/thumbs/pico38116.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38117#p"> Catrap 0.1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=38117#p"> [Click to Play]</a> </td></tr></table> <br /> </div></div></div></p> https://www.lexaloffle.com/bbs/?tid=28944 https://www.lexaloffle.com/bbs/?tid=28944 Thu, 09 Mar 2017 02:34:25 UTC The Ring <p> <table><tr><td> <a href="/bbs/?pid=37990#p"> <img src="/bbs/thumbs/pico37989.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37990#p"> The Ring 1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=37990#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=28922 https://www.lexaloffle.com/bbs/?tid=28922 Thu, 02 Mar 2017 02:19:15 UTC Super Mario 8 <p> <table><tr><td> <a href="/bbs/?pid=37405#p"> <img src="/bbs/thumbs/pico37404.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37405#p"> Super Mario 8 0.1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=37405#p"> [Click to Play]</a> </td></tr></table> </p> <p>Testing out my <a href="https://www.lexaloffle.com/bbs/?tid=28793">Advanced Micro Platformer Starter Kit</a>'s ability to handle 16x16 sprites (vs more common 8x8 used in a lot of pico-8 games).</p> https://www.lexaloffle.com/bbs/?tid=28827 https://www.lexaloffle.com/bbs/?tid=28827 Sun, 12 Feb 2017 20:10:59 UTC Advanced Micro Platformer - Starter Kit <p> <table><tr><td> <a href="/bbs/?pid=37158#p"> <img src="/bbs/thumbs/pico37402.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37158#p"> Advanced Micro Platformer - Starter Kit 1.1</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=37158#p"> [Click to Play]</a> </td></tr></table> </p> <p>I have taken my most recent Pico-8 game <a href="https://www.lexaloffle.com/bbs/?tid=28714">Kid Bludd</a>, stripped it down to the essentials, and I am releasing it as a kind of Platforming Game Starter Kit.</p> <p>I removed all logic that isn't game agnostic, so it is hopefully a good starting point for pretty much any platformer.</p> <p>It's not super complicated, but does a lot of stuff I see many games not doing, which I consider table stakes for a platformer that feel good.</p> <p>Features the basics:</p> <ul> <li>Animation System</li> <li>Collision Routines</li> <li>Camera (w/Shake)</li> <li>But also...</li> </ul> <p><span style="text-decoration: underline;"><strong>Forgiving Jumps</strong></span></p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/plat_adv_jump.gif" width=256 height=256 alt="" /> <p>This one is very subtle but one of the most important pieces of a platformer. In general the player can only jump if they are on the ground, but this can make the game feel unresponsive when trying to make precision jumps. To give the player some leeway, the game allows jumps for a few frames after the player leaves a platform, and also registers jump presses if they came a few frames <em>before</em> landing.</p> <p><span style="text-decoration: underline;"><strong>Mario Sliding</strong></span></p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/plat_slide.gif" width=256 height=256 alt="" /> <p>When you change direction while moving, there is a bit of a slide before moving in the new direction.</p> <p><span style="text-decoration: underline;"><strong>Air and Ground Friction</strong></span></p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/plat_friction.gif" width=256 height=256 alt="" /> <p>Tunable values for both how much the player slows down while in the air and when touching the ground. This is critical for allowing the player to land on small platforms, while maintaining a good feeling in the air.</p> <p><span style="text-decoration: underline;"><strong>Variable Jump Height</strong></span></p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/plat_jump.gif" width=256 height=256 alt="" /> <p>Tap to jump a small amount, and hold to jump higher. Again very critical for precision jumps.</p> <p><span style="text-decoration: underline;"><strong>Pass Through Floors</strong></span></p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/plat_floors.gif" width=256 height=256 alt="" /> <p>Some floors allow the player to jump up through them, but not down. Really important for any levels with verticality, but also fun for horizontal scrollers.</p> <p><span style="text-decoration: underline;"><strong>Camera Scrolling Threshold</strong></span></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/plat_cam_threash.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/metroid_horiz_240h.gif" width=320 height=240 alt="" /></p> <p>This cart uses the same camera style as metroid, where the player must leave a small area in the center of the screen before it starts scrolling. This give the player the freedom to make minor movements without causing nauseating camera movements.</p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#aaaaaa><span style="color: #101010;">This is a follow up to my original cart: <a href="https://www.lexaloffle.com/bbs/?tid=27626">&quot;Micro Platformer - Simple Platforming Engine in 100 Lines of Code&quot;</a>. If you are new to programming, I strongly suggest starting with that cart, as it is much simpler to follow!</p> <p> <table><tr><td> <a href="/bbs/?pid=28249#p"> <img src="/bbs/thumbs/pico28248.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=28249#p"> Mico Platformer - Simple Platforming Engine in 100 Lines of Code 1.0</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=28249#p"> [Click to Play]</a> </td></tr></table> </p> <p><br></span></td></tr></table></p> <p>Old Versions:<br /> <div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> <table><tr><td> <a href="/bbs/?pid=37158#p"> <img src="/bbs/thumbs/pico37157.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37158#p"> Advanced Micro Platformer - Starter Kit 1.0</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=37158#p"> [Click to Play]</a> </td></tr></table> <br /> </div></div></div></p> https://www.lexaloffle.com/bbs/?tid=28793 https://www.lexaloffle.com/bbs/?tid=28793 Sat, 04 Feb 2017 19:18:19 UTC Animation through Palette Cycling <p> <table><tr><td> <a href="/bbs/?pid=36841#p"> <img src="/bbs/thumbs/pico36840.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=36841#p"> Animation through Palette Cycling 1.0</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=36841#p"> [Click to Play]</a> </td></tr></table> </p> <p>Short demo showing how to do animations with nothing but palette cycling. </p> <p><center><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/PICO-8_65.gif" width=256 height=256 alt="" /></center></p> <p>On the right is the actual sprite used, with not palette cycling.</p> <p>On the left is the resulting animation, when cycling through the palette.</p> <p>A very primitive example of the amazing techniques seen here: <a href="http://www.effectgames.com/demos/canvascycle/?sound=0"><a href="http://www.effectgames.com/demos/canvascycle/?sound=0">http://www.effectgames.com/demos/canvascycle/?sound=0</a></a></p> <p><strong>Disclaimer</strong>: I'm not an artist, so it would be great to see an actual pixel artist do something with this. :)</p> https://www.lexaloffle.com/bbs/?tid=28751 https://www.lexaloffle.com/bbs/?tid=28751 Sun, 29 Jan 2017 01:48:03 UTC Kidd Bludd's Treacherous Tower - Bubble Bobble Inspired Platformer <p> <table><tr><td> <a href="/bbs/?pid=36438#p"> <img src="/bbs/thumbs/pico36437.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=36438#p"> Kidd Bludd's Treacherous Tower - Bubble Bobble Inspired Platformer 1.0</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=36438#p"> [Click to Play]</a> </td></tr></table> </p> <p>My 12th one-game-a-month project, and my 4th Pico-8 game. </p> <p>Loosely inspire by Bubble Bobble, but with a darker, more action-packed twist.</p> <p><center><br /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/Bludd01.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/Bludd02.gif" width=256 height=256 alt="" /><br /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/Bludd03.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/Bludd04.gif" width=256 height=256 alt="" /><br /> </center></p> https://www.lexaloffle.com/bbs/?tid=28714 https://www.lexaloffle.com/bbs/?tid=28714 Sun, 22 Jan 2017 21:34:17 UTC How to Pause or Mute Music? <p>Is it possible to pause or mute music in Pico-8 from script?</p> <p>I want to halt the music for a short period when the player dies, and resume it when they respawn. Pause or Mute would both work in this case; I just don't want to restart the whole song every time they die.</p> <p>Thanks!</p> <p>This is what I currently do:</p> <div> <div style="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> -- Player Spawns... music(0) --Player dies music(-1) -- Player Spawns... music(0) </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=28533 https://www.lexaloffle.com/bbs/?tid=28533 Wed, 11 Jan 2017 20:59:59 UTC Talos Descent - Insane Endless Twitch Reflex Game <p> <table><tr><td> <a href="/bbs/?pid=32863#p"> <img src="/bbs/thumbs/pico34523.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=32863#p"> Talos Descent - Twitch Endless Reflex Game 1.2</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=32863#p"> [Click to Play]</a> </td></tr></table> </p> <p>My 11th one-game-a-month project, and my 3rd Pico-8 game. Mostly procedurally generated, with a few sprites for decoration. Main character by Adam Atomic.</p> <p>Post high-scores below!<br /> <center><br /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/PICO-8_202.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/PICO-8_196.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/PICO-8_203.gif" width=256 height=256 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15406/PICO-8_204.gif" width=256 height=256 alt="" /><br /> </center></p> <p><strong>Version 1.2</strong></p> <ul> <li>New music and sound by @gruber_music</li> </ul> <p><strong>Version 1.1</strong></p> <ul> <li>Improve rendering to remove glitches (thanks ultrabrite).</li> <li>Commented code and removed unused logic.</li> </ul> https://www.lexaloffle.com/bbs/?tid=28132 https://www.lexaloffle.com/bbs/?tid=28132 Thu, 01 Dec 2016 01:13:04 UTC Major Stuttering/Dropped Frames in Browser <p>The game I am currently working runs smooth in Pico-8 EXE but when I run in Chrome it has significant perf issues; often dropping frames causing hitches.</p> <p>Is this a know thing? Is there a way to help with this, or diagnos it better?</p> <p>A couple things:</p> <p>1) I am running at 60 fps.<br /> 2) I do a LOT of dynamic allocations and discarding (its an endless, procedural game).<br /> 3) Stat(1) returns about .3 in best case, and .6 in worst case. Does stat(1) account for FPS target or is .6 on 60fps .1 over budget?<br /> 4) It runs totally smooth in Edge Browser, but buttons don't work properly (missing release events i think) and image is blurry (not using point filter).</p> <p>Thanks!</p> <p>Here's the game:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=28132"><a href="https://www.lexaloffle.com/bbs/?tid=28132">https://www.lexaloffle.com/bbs/?tid=28132</a></a></p> https://www.lexaloffle.com/bbs/?tid=28131 https://www.lexaloffle.com/bbs/?tid=28131 Thu, 01 Dec 2016 00:54:32 UTC Good &quot;Air Jet&quot; sound? <p> <table><tr><td> <a href="/bbs/?pid=32743#p"> <img src="/bbs/thumbs/pico32741.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=32743#p"> Air Jets 666</a><br><br> by <a href="/bbs/?uid=15406"> mhughson</a> <br><br><br> <a href="/bbs/?pid=32743#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>FINAL GAME IS HERE: <a href="https://www.lexaloffle.com/bbs/?tid=28132"><a href="https://www.lexaloffle.com/bbs/?tid=28132">https://www.lexaloffle.com/bbs/?tid=28132</a></a></strong></p> <p>In the game above, the character is gliding in zero-g. They can move left and right using little air jets on the side of the space suit (left and right arrow keys).</p> <p>I am struggling to make a good sound for this that isn't too grating (you will hear the sound A LOT). I was hoping for a high-pitch hiss; like air escaping a ballon, but having nailed it yet (see above).</p> <p>&quot;TSSSsss.. TSSSssss...&quot;</p> <p>Any audio designers know how to achieve this sound?</p> https://www.lexaloffle.com/bbs/?tid=28107 https://www.lexaloffle.com/bbs/?tid=28107 Fri, 25 Nov 2016 01:02:09 UTC