bilodau [Lexaloffle Blog Feed] Check for another cart <p>Hi,</p> <p>I'm currently working on my custom editor to edit tiles in one of my game, using reload and cstore functions from another cart. But there's something I don't know how to do. I want it to detect if the other cart is present when I launch the editor cart, and output an error message if it isn't. Can someone help me?</p> <h2>Thanks in advance</h2> <p>bilodau</p> Sun, 12 Mar 2023 00:04:34 UTC Changing all sprites to another <h2>I've been trying ways to take a specific sprite and replace all of them on the map with another sprite.</h2> <h2>Here are two methods I figured out.</h2> <p> <table><tr><td> <a href="/bbs/?pid=126257#p"> <img src="/bbs/thumbs/pico8_set_all1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=126257#p"> set_all1</a><br><br> by <a href="/bbs/?uid=72458"> bilodau</a> <br><br><br> <a href="/bbs/?pid=126257#p"> [Click to Play]</a> </td></tr></table> <br /> This here is the first method and the one I use in my Pico-8 game &quot;Marley The Adventurer&quot;. Probably the most simple and reliable method. It just scans all tiles one by one every time it wants to swap and immediatly replaces it by the other tile if the tile matches the one specified. It uses almost no extra RAM, but a lot of CPU usage. And if one of the tiles gets removed or if one gets added it will still react properly and replace the new tiles as well.<br /> The function takes two parameters: <code>set_all1(current_tile_sprite, new_tile_sprite)</code></p> <h2>Now for the next one</h2> <p> <table><tr><td> <a href="/bbs/?pid=126257#p"> <img src="/bbs/thumbs/pico8_set_all2-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=126257#p"> set_all2</a><br><br> by <a href="/bbs/?uid=72458"> bilodau</a> <br><br><br> <a href="/bbs/?pid=126257#p"> [Click to Play]</a> </td></tr></table> <br /> This method works by scanning the whole map when you run the cart (which may lead to longer loading times) and stores the sprites coordinates into a variable. The tile replacing function simply reads the coordinates that were in memory and replaces them with a given sprite. This method is good when you have few tiles to replace, as it takes just a bit more RAM to save a lot of CPU, but if you want to replace a sprite that is drawn almost all over the map, this method will save a tiny bit of CPU and take a lot more RAM. It also takes more code and has the downside of not responding to map changes: it will still try to replace the coordinates in memory even if you made changes to the map.</p> <p>The function that puts the sprites in memory:<br /> <code>sprites_in_memory = get_all2(sprite)</code></p> <p>The function that sets a new sprite:<br /> <code>set_all2(sprites_in_memory, new_sprite)</code></p> <h2>What other ways do you have in mind? I'm kind of new to Pico-8 and I'd like to know what you would come up with.</h2> <p>P.S. There seems to be a bug with the amount of memory shown on the browser</p> Fri, 24 Feb 2023 23:47:19 UTC stat(0) significant RAM decrease after rebooting <p>I've been noticing a significant decrease of the RAM Pico-8 shows in stat(0) after rebooting it. I just updated from 0.2.5e to 0.2.5g and didn't notice this bug in 0.2.5e. But since I don't reboot often, I might have missed it in 0.2.5e.</p> <p>Anyway, this bug might be new. Here are some pictures to show you the RAM usage as shown by stat(0) before and after rebooting Pico-8.</p> <img style="margin-bottom:16px" border=0 src="/media/72458/6_marley_1.png" alt="" /> <img style="margin-bottom:16px" border=0 src="/media/72458/marley_2.png" alt="" /> <p>87KB before reboot, and 23KB after reboot.</p> <p>The games still seem to play fine.</p> <p>EDIT: The bug also affects version 0.2.5e</p> Thu, 09 Feb 2023 18:06:10 UTC Sorting demo (by Zep) animated! <p> <table><tr><td> <a href="/bbs/?pid=125259#p"> <img src="/bbs/thumbs/pico8_sort_animated-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=125259#p"> Sorting demo (by Zep) animated!</a><br><br> by <a href="/bbs/?uid=72458"> bilodau</a> <br><br><br> <a href="/bbs/?pid=125259#p"> [Click to Play]</a> </td></tr></table> </p> <p>This here is the sort demo by Zep that I animated. I don't really like how the code looks, but it works very well.</p> <p>Hope you enjoy</p> <p>EDIT: Now without the one frame delay that was in the first version</p> <p>bilodau</p> Fri, 03 Feb 2023 21:58:27 UTC Sound is horrible when playing on old mobile <p>I'm trying to play some pico-8 games online on my Galaxy A8, and the sound sounds horrible. My Galaxy Tab S6 doesn't have this problem.</p> Wed, 11 Jan 2023 03:24:19 UTC Marley The Adventurer (WIP) <p> <table><tr><td> <a href="/bbs/?pid=124077#p"> <img src="/bbs/thumbs/pico8_marley_beta-28.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=124077#p"> Marley The Adventurer (V0.41)</a><br><br> by <a href="/bbs/?uid=72458"> bilodau</a> <br><br><br> <a href="/bbs/?pid=124077#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's a little game I'm currently working on. My first Pico-8 game.<br /> Guide Marley through a fun little adventure.</p> <p>I started from scratch and made everything myself. I also composed the music.<br /> I think that all these hours of work pretty much paid off, and I'm generally proud of the result.</p> <p>I'd like to know what you think of it, and if you find any bugs. I'm open to criticism, so tell me what you like and what you don't.</p> <p>Special thanks to <a href=""> @dw817</a> and <a href=""> @merwok</a> who gave me tips to optimize the game.</p> <h2>Have fun!</h2> <p>bilodau</p> <p>P.S. Here's the very first Marley version I uploaded on this website. Originally uploaded on Jan 10 2023. </p> <p>There is a known bug in it if you try interact with the vault door while the vault door return prompt is shown and you press x. Which may lead to Marley teleporting at the wrong spot or even to a softlock.<br /> <table><tr><td> <a href="/bbs/?pid=124077#p"> <img src="/bbs/thumbs/pico8_marley0_1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=124077#p"> [OUTDATED] Marley The Adventurer (V0.1)</a><br><br> by <a href="/bbs/?uid=72458"> bilodau</a> <br><br><br> <a href="/bbs/?pid=124077#p"> [Click to Play]</a> </td></tr></table> </p> Wed, 11 Jan 2023 02:07:50 UTC