oakreef [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=22615 Custom font memory converter <p> <table><tr><td> <a href="/bbs/?pid=87641#p"> <img src="/bbs/thumbs/pico8_font_mapper-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=87641#p"> Custom Font Loader</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=87641#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's a cart I threw together for myself to use with the new custom font feature.</p> <p>When run it will read the spritesheet into memory as a custom font, then copy a code snippet to your clipboard that will import that font into another cart. It doesn't include the values from 0x5f60-&gt;0x5f64, that define the overall font attributes. Those must be set manually in the cart you are importing to.</p> <p>The import has several optimisations. Instead of always copying the entire custom font memory block it starts from the first non-zero memory value in the block and continue to the last. To save characters it will construct two exports: one that uses poke and one that uses poke4 and export whichever is smaller. It will leave out unnecessary zeroes and also trim leading and trailing zeroes in the hex values for the poke4 export. It also stores all the values as a big string that's split and unpacked at runtime to save tokens.</p> <p>When defining the custom font on the spritesheet each 8x8 tile is one character and any non-zero colour value in the sheet will be interpreted as part of the glyph. The character set included by default is a Irish Gaelic typeface I made myself including character variants with s&iacute;neadh fada and ponc s&eacute;imhithe for the appropriate letters.</p> https://www.lexaloffle.com/bbs/?tid=41566 https://www.lexaloffle.com/bbs/?tid=41566 Mon, 15 Feb 2021 00:02:36 UTC Conway's Garden of Life - Tweetcart &amp; entry for TweetTweetJam 4 <p> <table><tr><td> <a href="/bbs/?pid=75970#p"> <img src="/bbs/thumbs/pico8_conways_garden-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=75970#p"> conways_garden</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=75970#p"> [Click to Play]</a> </td></tr></table> </p> <p>A little Conway's Game of Life simulation with some slight interactivity laid on top of it. Code is 280 characters. Arrow keys to move about and X to reset.</p> https://www.lexaloffle.com/bbs/?tid=37786 https://www.lexaloffle.com/bbs/?tid=37786 Wed, 06 May 2020 14:59:39 UTC BBS Randomiser <p> <table><tr><td> <a href="/bbs/?pid=54584#p"> <img src="/bbs/thumbs/pico8_bbs_randomiser-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=54584#p"> bbs_randomiser</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=54584#p"> [Click to Play]</a> </td></tr></table> </p> <p>Simple little cart that tries to load random IDs from the BBS. Try something new. When you've had enough of a cart just select &quot;new cart&quot; from the pause menu. The number in brackets is the ID of the current post it has loaded.</p> <p>Sadly though I'm seeing weird behaviour with that when I run through the BBS. It doesn't seem to display the correct number when you run this in browser, but it's correct when I run it locally. Sorry about that I have no idea what's going on there. But if you run it locally and want to find the thread the cart you're on is posted to just plug the number in here:<br /> <a href="https://www.lexaloffle.com/bbs/?pid">https://www.lexaloffle.com/bbs/?pid</a>=######</p> https://www.lexaloffle.com/bbs/?tid=31588 https://www.lexaloffle.com/bbs/?tid=31588 Wed, 01 Aug 2018 20:18:52 UTC PICO-8 animation editor <p> <table><tr><td> <a href="/bbs/?pid=53620#p"> <img src="/bbs/thumbs/pico8_animation_editor-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=53620#p"> animation_editor</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=53620#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is an animation editor I've made to help me with my current project. It's made for a very specific use case and I don't expect it to be particularly useful for other people, but might as well post it. In particular it's designed to help compress animations that have lots of repeated elements. e.g. In the example data in this cart the head layer is used across almost every animation, but only appears once in the spritesheet.</p> <p>To this end it is very much optimised to favour saving space in the sprite sheet, and not optimised for CPU or RAM usage. It also assumes the data outputted is going to be handled in a very object-oriented fashion (see example implementation further down).</p> <p>I've example animations in the cart (they're for the game I'm currently working on) that should load when the cart is viewed on the BBS, but won't load when run in the normal Pico-8 environment. Feel free to play around with it, but you won't be able to export or save anything from the BBS.</p> <hr /> <p><strong>General outline</strong></p> <p>The editor defines characters, which have a set of animations, which have a number of frames, which each have a duration and ten layers to draw on. General usage is just to create animations, which can be exported via the &quot;export&quot; button. This will create four files:</p> <ul> <li>spritesheet.png - the exported sprite sheet to be used in your game</li> <li>metadata.p8l - lua table structure containing all the animation information needed to draw animations from the above spritesheet</li> <li>metasheet.png - the same information, but stored in a different format as image data so that the animation editor is able to re-import it</li> <li>debug.p8l - the exact data as in metasheet.png but in text format, just for debugging purposes</li> </ul> <p>On startup the editor will import any data from metasheet.png and spritesheet.png back in so that you can continue editing where you left off.</p> <hr /> <p><strong>Controls</strong></p> <ul> <li>the window on the left is for drawing, the ten windows on the right are ten layers each frame can use</li> <li>you can't rearrange or add more layers but the 'c' and 'v' keys can be used to copy and paste the selected layer</li> <li>you need to create at least one character, animation and frame and select a layer before you start editing</li> <li>when entering names only english alphabet characters are accepted. Use enter to submit and / or \ to cancel. Backspace works as you would expect.</li> <li>use the arrows keys to move layers around (no wrapping - going off the edge will just erase data)</li> <li>use the wasd keys to move the origin point</li> <li>use - and + to navigate through characters quickly</li> <li>use [ and ] to navigate through animations quickly</li> <li>use ' and \ to navigate through frames quickly</li> <li>p/f toggles the paint or fill tool. Be warned there's no undo button so be very careful with the fill tool</li> <li>'oni' toggles onion skinning</li> <li>the 'w' next to it toggles wrapping for the onion skinning. When enabled and viewing the first frame in an animation, the onion skin layer will show the last frame from that animation.</li> <li>'orig' toggles showing the origin point for the current frame</li> </ul> <hr /> <p><strong>Implementing animations in your cart</strong></p> <p>when you have your animations finished you should import the spritesheet into your own cart and copy the contents of metadata.p8l into an initialisation function in your game. You will then obviously need some special draw functions to do something with that data. Here is an implementation I have done as an example, taking a very object-oriented approach.</p> <p> <table><tr><td> <a href="/bbs/?pid=53620#p"> <img src="/bbs/thumbs/pico8_animation_viewer-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=53620#p"> animation_viewer</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=53620#p"> [Click to Play]</a> </td></tr></table> </p> <hr /> <p><strong>Change log</strong></p> <p>version 2.0</p> <ul> <li>rewrote large parts of the editor</li> <li>optimised processor and memory usage a tonne</li> <li>fixed detection of identical layers so that they sprites don't have to be in the same position</li> <li>increased number of working layers to 10</li> <li>added processor and memory monitors</li> <li>added example data</li> </ul> <p>version 1.3</p> <ul> <li>fixed bug causing data loss on import for large frames</li> <li>fixed bug with duplicate frames being assigned the wrong spritesheet y-coordinate on export</li> <li>changed import process slightly to make each frame try to use the same origin point as the previous frame in the same animation</li> </ul> <p>version 1.2</p> <ul> <li>added fill tool</li> <li>added optional wrapping behaviour to onion skinning</li> <li>export process will now notice duplicate layers and only export them once</li> <li>fixed various bugs related to import and export, works much more reliably now</li> </ul> <p>version 1.1</p> <ul> <li>fixed play button crashing the editor when there are imported animations</li> </ul> <p>version 1.0</p> <ul> <li>editor will now import previously exported data on startup</li> <li>functioning delete buttons</li> <li>layout changes</li> <li>misc crashes fixed</li> </ul> <p>version 0.2</p> <ul> <li>fixed right clicking on most elements crashing the cart</li> <li>changed input code so enter and backspace now work when inputing names</li> </ul> https://www.lexaloffle.com/bbs/?tid=31425 https://www.lexaloffle.com/bbs/?tid=31425 Sat, 16 Jun 2018 23:12:48 UTC the tweetjar museum of #tweetjams <p> <table><tr><td> <a href="/bbs/?pid=52228#p"> <img src="/bbs/thumbs/pico8_tweetjar-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=52228#p"> tweetjar</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=52228#p"> [Click to Play]</a> </td></tr></table> </p> <p>I wanted to make a little compilation of tweetcarts for a while and <em>The Pippin Barr Game Idea Jam #2: The Museums Jam</em> gave me an excuse to throw something together. Please enjoy this museum of tweets.</p> https://www.lexaloffle.com/bbs/?tid=31214 https://www.lexaloffle.com/bbs/?tid=31214 Tue, 01 May 2018 13:00:53 UTC Symbols for pause button and enter/return key? <p>I know Zep has said the API is pretty much finalised so I'm guessing he's not planning on adding characters to the font but I think it'd be nice for the purpose of displaying controls/tutorials to have symbols to represent the start button (for posting carts to BBS) and the return key (for posting elsewhere where people aren't familiar with PICO-8 controls).</p> <p>I made a quick mock up for them sticking to the 7x5 limit other glyphs use.</p> <img style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/22615/pause.png" width=63 height=21 alt="" /> https://www.lexaloffle.com/bbs/?tid=30313 https://www.lexaloffle.com/bbs/?tid=30313 Fri, 24 Nov 2017 15:57:35 UTC Me Too Thx <p> <table><tr><td> <a href="/bbs/?pid=42273#p"> <img src="/bbs/thumbs/pico8_me_too_thx-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=42273#p"> me_too_thx</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=42273#p"> [Click to Play]</a> </td></tr></table> </p> <p>A month ago I posted a thread on reddit/r/me_irl promising to make a game based off whatever the top comment was - this was the top comment:</p> <p>&quot;a SSB esque fighting game between all the frog memes (Wednesday, Dat Boi, Pepe, Kermit, etc.) and name it &quot;Me too thanks&quot;&quot;</p> https://www.lexaloffle.com/bbs/?tid=29606 https://www.lexaloffle.com/bbs/?tid=29606 Sat, 08 Jul 2017 11:45:18 UTC Conway's Game of Life in 138 characters! <p> <table><tr><td> <a href="/bbs/?pid=39440#p"> <img src="/bbs/thumbs/pico8_game_of_life_tweetcart-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=39440#p"> game_of_life_tweetcart</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=39440#p"> [Click to Play]</a> </td></tr></table> </p> <p>Ok with a bunch of help from LRP I have an entry that works in 138 characters! I'm so happy I managed this. I didn't think I'd actually be able to compress it this small. It was a lot of fun to do.</p> <p>code:</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=2^13::s::for a=0,k do n=0 for x=0,8 do n+=peek(k*3+a+x/3+x%3*64-65)end poke(a,n==12 and 4 or n==16 and peek(a))end memcpy(k*3,0,k)goto s </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Original post:<br /> Was trying to make Conway's Game of Life into a #tweetjam entry but wasn't able to get it below 175 characters. It reads the screen to do the simulation so while it will always display the same simulation from the BBS you can do whatever input data you want if you download the cart by having whatever you like on screen when you hit run.</p> <p>If anyone can spot a way to compress it more please share!</p> <p>version 1: <table><tr><td> <a href="/bbs/?pid=39440#p"> <img src="/bbs/thumbs/pico39438.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=39440#p"> Conway's Game of Life in 175 characters 1</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=39440#p"> [Click to Play]</a> </td></tr></table> <br /> version 2: <table><tr><td> <a href="/bbs/?pid=39440#p"> <img src="/bbs/thumbs/pico39452.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=39440#p"> Conway's Game of Life tweetjam attempt 2</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=39440#p"> [Click to Play]</a> </td></tr></table> <br /> version 3: <table><tr><td> <a href="/bbs/?pid=39440#p"> <img src="/bbs/thumbs/pico39484.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=39440#p"> Conway's Game of Life #tweetjam 3</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=39440#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=29131 https://www.lexaloffle.com/bbs/?tid=29131 Sun, 09 Apr 2017 05:30:43 UTC Super Fash Bash <p> <table><tr><td> <a href="/bbs/?pid=37983#p"> <img src="/bbs/thumbs/pico8_super_fash_bash-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37983#p"> super_fash_bash</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=37983#p"> [Click to Play]</a> </td></tr></table> </p> <p>I entered a game jam a couple of weeks ago with the theme of &quot;punch nazis&quot;. This is the result of my efforts - Super Fash Bash runner up for the &quot;Best Nazi Punch&quot; award for the jam.</p> https://www.lexaloffle.com/bbs/?tid=28920 https://www.lexaloffle.com/bbs/?tid=28920 Wed, 01 Mar 2017 17:09:46 UTC Does the BBS support multiple carts? <p><strong>Final Edit:</strong> ultrabrite has pointed out that zep's official word on it is</p> <p>&quot;Multicart exports offer a way to package and distribute what you can already do with local files (e.g. zipping up a group of carts), but isn't supported on the BBS and probably never will be. I think feeling invited to design for single 32k carts is an important aspect of PICO-8, so separating multicarts to the exporter is a way to preserve that to some degree while still broadening the scope of what can be made with PICO-8.&quot;</p> <p>From the 0.1.10 release thread: <a href="https://www.lexaloffle.com/bbs/?tid=28168">https://www.lexaloffle.com/bbs/?tid=28168</a> </p> <p><strong>Original post:</strong><br /> Hey I looking into the idea of using the reload() function in the game I'm working on to possibly store data for extra levels on a separate cart and load them in as you progress. I understand that the HTML5 export explicitly supports multiple carts but I'm not clear on if it's possible to upload multiple carts to the BBS and be able to access data from each other?</p> <p>Edit: Testing with a simple two-cartridge system I made</p> <p> <table><tr><td> <a href="/bbs/?pid=36963#p"> <img src="/bbs/thumbs/pico37523.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=36963#p"> multi-base.p8.png</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=36963#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=36963#p"> <img src="/bbs/thumbs/pico37524.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=36963#p"> multi-1.p8.png</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=36963#p"> [Click to Play]</a> </td></tr></table> </p> <p>Edit2: Looks like it doesn't work when referencing them by their filenames when I post them to the same thread anyway</p> https://www.lexaloffle.com/bbs/?tid=28764 https://www.lexaloffle.com/bbs/?tid=28764 Tue, 31 Jan 2017 08:24:36 UTC Tiny Nokia <p> <table><tr><td> <a href="/bbs/?pid=35950#p"> <img src="/bbs/thumbs/pico8_tiny_nokia-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=35950#p"> tiny_nokia</a><br><br> by <a href="/bbs/?uid=22615"> oakreef</a> <br><br><br> <a href="/bbs/?pid=35950#p"> [Click to Play]</a> </td></tr></table> </p> <p>My first submission, I hope I have this correct!</p> <p>A classic game of Snake. Start it up with the tab key then use the arrow keys to guide your snake to the food that appears, just don't crash into yourself!</p> <p>Eat 15 fruits in each level to advance to the next. With each level the speed increases.</p> <hr /> <h2>Changelog </h2> <p>v1.2</p> <ul> <li>Removed screen shaking on input</li> <li>Rewrote input code to hopefully feel more responsive<br /> v1.1</li> <li>Reduced the level of shaking on input</li> <li>Stopped certain input combinations allowing you to turn backwards into yourself</li> </ul> https://www.lexaloffle.com/bbs/?tid=28609 https://www.lexaloffle.com/bbs/?tid=28609 Tue, 17 Jan 2017 17:31:38 UTC