Mellogy [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=37079 picos_farm <p> <table><tr><td> <a href="/bbs/?pid=86120#p"> <img src="/bbs/thumbs/pico8_picos_farm-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86120#p"> picos_farm</a><br><br> by <a href="/bbs/?uid=37079"> Mellogy</a> <br><br><br> <a href="/bbs/?pid=86120#p"> [Click to Play]</a> </td></tr></table> </p> <p>A game made in roughly 3 days for the ToyBoxJam 2020! Plant some crops and stay out of debt. See how many days you can last. </p> <p>This doesn't quite have all the stuff that I wanted to put in it, but now that the deadline is extended I'll probably keep playing with the concept :)</p> <p>It definitely needs a good chunk of optimization, but I still think it's a fun little toy. </p> https://www.lexaloffle.com/bbs/?tid=41063 https://www.lexaloffle.com/bbs/?tid=41063 Mon, 04 Jan 2021 02:36:07 UTC Tile bitmasking wip <p> <table><tr><td> <a href="/bbs/?pid=85915#p"> <img src="/bbs/thumbs/pico8_sasnagoza-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=85915#p"> sasnagoza</a><br><br> by <a href="/bbs/?uid=37079"> Mellogy</a> <br><br><br> <a href="/bbs/?pid=85915#p"> [Click to Play]</a> </td></tr></table> </p> <p>Arrow keys to move around, X to place a grass tile. Just a quick and dirty implementation of tile bitmasking.</p> <p>Basic process is:</p> <ul> <li>Create table same width/height as map, store what kind of tile is here (empty,grass,water,etc)</li> <li>When you hit the X key, assign the corresponding index in the table to 1</li> <li>Run a function to update the map accordingly</li> <li>Show map and cursor</li> </ul> <p>The autotile function checks the cardinal directions for neighboring tiles of the same type using the table, then returns a value 0-15 depending on what came back. Then we pull from another table filled with sprite indexes to figure out what should go on the map. </p> <p>I used this article to figure out the best way to go about this: <a href="https://gamedevelopment.tutsplus.com/tutorials/how-to-use-tile-bitmasking-to-auto-tile-your-level-layouts--cms-25673">https://gamedevelopment.tutsplus.com/tutorials/how-to-use-tile-bitmasking-to-auto-tile-your-level-layouts--cms-25673</a></p> <p>This current implementation is quite token heavy and isn't the cleanest thing in the world, but it's a good start I think!</p> https://www.lexaloffle.com/bbs/?tid=40984 https://www.lexaloffle.com/bbs/?tid=40984 Wed, 30 Dec 2020 03:44:22 UTC 9-Slice Utility <p> <table><tr><td> <a href="/bbs/?pid=65178#p"> <img src="/bbs/thumbs/pico8_nineslice-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=65178#p"> Nineslice Demo</a><br><br> by <a href="/bbs/?uid=37079"> Mellogy</a> <br><br><br> <a href="/bbs/?pid=65178#p"> [Click to Play]</a> </td></tr></table> </p> <p>A quick little function to draw 9-slice boxes. Has modes for stretched or repeated sprites along the borders, and an optional background color. A little heavy for general use at ~444 tokens, and could probably be optimized further.</p> <h3>Use:</h3> <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>nineslice(x origin,y origin,width in px,height in px, sprite index for upper left corner, stretched mode (true/false), background color)</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=34508 https://www.lexaloffle.com/bbs/?tid=34508 Thu, 13 Jun 2019 16:16:15 UTC