camerongoble [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=25555 piconoc: Nature of Code Ecosystem <p>PICO-8 + Nature of Code + ECS = piconoc.</p> <p>Emergent ecosystem behaviors for agents in Pico-8. Based on Daniel Schiffman's &quot;Nature of Code&quot;. Uses Entity Component Systems.</p> <p>***UPDATE: 100% more player control of frog with arrow keys. Frog also eats nearby flies.</p> <p> <table><tr><td> <a href="/bbs/?pid=98876#p"> <img src="/bbs/thumbs/pico8_piconoc_ecosystem-8.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=98876#p"> piconoc_ecosystem</a><br><br> by <a href="/bbs/?uid=25555"> camerongoble</a> <br><br><br> <a href="/bbs/?pid=98876#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hi! I want to simulate flies and frogs and lizards and spaceships and such in PICO-8. And I want to do so in ways that give surprising results. PLUS I want to refine my understanding of Entity Component Systems (ECS). This cart holds my efforts to do all those things. </p> <p>Critters should be recognizable by their behaviors, not the graphics and/or sounds.</p> <p>This is a very early learning project in process.</p> <p>More details and source code;<br /> <a href="https://github.com/camerongoble/piconoc">https://github.com/camerongoble/piconoc</a></p> <p>Critters in progress:</p> <ul> <li>flies (implemented!)</li> <li>frogs (implemented!)</li> <li>rabbits </li> <li>snakes</li> <li>cows?</li> <li>aliens?</li> <li>Cthulhu?</li> </ul> <p>When a fly hits the borders, it makes a &quot;blatt&quot; sound. Because flies make annoying sounds in real life. So authentic!</p> <p>The framework will ideally make it possible to simply add data without lots of customized functions for each critter's particular behavior. I'm not there yet. But I'm getting there.</p> https://www.lexaloffle.com/bbs/?tid=45052 https://www.lexaloffle.com/bbs/?tid=45052 Wed, 20 Oct 2021 01:32:48 UTC Virtual Pet Time Traveler minigame: Console Panic! (Fixed) <p>Help your pet time traveler pilot his way to the next planet in an endless journey of excitement and discovery! But watch out! The ship is a bit tricky to handle.</p> <p>UDLR arrows maneuver your traveler around the central console. Look for X and O hints to operate the ship. Be quick! When flying a time machine, Time is against you.</p> <p> <table><tr><td> <a href="/bbs/?pid=96264#p"> <img src="/bbs/thumbs/pico8_jazegukido-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=96264#p"> virtual_pet_time_traveler-0</a><br><br> by <a href="/bbs/?uid=25555"> camerongoble</a> <br><br><br> <a href="/bbs/?pid=96264#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is one of several mini games that will be a part of the whole cartridge. Working from a minimalist Tomagotchi style of game play with an LCD aesthetic. </p> <p>I hope for feedback on general snappiness and sense of hurried panic. Any critique and/or enthusiasm also welcome :)</p> <p>PLEASE NOTE: The minigame starts immediately. The only way for the minigame to end is with a &quot;ding&quot; when you reach the destination planet. This marks a successful journey. There is no failure state implemented yet, but there will be a suitable &quot;you lose&quot; screen when the console is completely destroyed.</p> https://www.lexaloffle.com/bbs/?tid=44321 https://www.lexaloffle.com/bbs/?tid=44321 Fri, 20 Aug 2021 15:10:05 UTC print(&quot;\^a&quot;) -- introduces a new line with the beep <p>Okay, so, interesting bug/feature: print(&quot;^a&quot;) with just the beep and not the text introduces a new line at the last cursor point. </p> <p>If this is the first print() in the game, and if x/y coordinates are not specified, the new line will insert at the bottom of the screen and force the screen to scroll, potentially disrupting previously drawn graphics.</p> <p>In the game of the attached screenshot, the blue case and UPLR button are drawn first, then a beep via print(&quot;^a&quot;), then the &quot;Vortex&quot; in the next print(). Note the scrolling of the lower buttons by one character height.</p> <p>Specifying x/y coords prevents this corruption from happening, e.g.: print(&quot;\^a&quot;, 0, -20).</p> <p>The expected behavior was that since the print() was called with only a beep code and no text, it would not force a new line.</p> <p>A solution might be to check if pixel width of a print equals zero, and if so, to prevent the new line at the end of the print.</p> https://www.lexaloffle.com/bbs/?tid=41995 https://www.lexaloffle.com/bbs/?tid=41995 Sun, 14 Mar 2021 05:01:04 UTC #include does not respect white space <p>Using .12c.</p> <p>If &quot;#include file.p8&quot; is preceded by whitespace, it will result in a syntax error: unexpected symbol near #.</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>#include my_stuff.p8 &lt;- works #include my_stuff.p8 &lt;- doesn't work</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>This makes it difficult to embed #includes into &quot;function() end&quot; blocks without disrupting indention for readability. </p> <p>Perhaps the &quot;#&quot; character is being called upon to do just a little too much work? Maybe &quot;@&quot; for compiler directives would be a better choice. </p> https://www.lexaloffle.com/bbs/?tid=37369 https://www.lexaloffle.com/bbs/?tid=37369 Wed, 15 Apr 2020 18:36:58 UTC