lewsidboi [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=44552 Petri v1.0.1a <p> <table><tr><td> <a href="/bbs/?pid=145866#p"> <img src="/bbs/thumbs/pico8_petri_v1-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=145866#p"> Petri</a><br><br> by <a href="/bbs/?uid=44552"> lewsidboi</a> <br><br><br> <a href="/bbs/?pid=145866#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Petri</h1> <p>Petri is a chill cellular life simulator. Witness the rise and fall of countless living cells all trying their best to survive and reproduce.</p> <p>Behavior and ultimate fitness are governed by stats, mutations, and a move-set, all of which are encoded into rudimentry DNA that is passed down to offspring.</p> <p>Cells that consume enough food become healthy enough to reproduce. Reproduction weakens a cell, but allows it to pass its DNA (with potential mutations) on to the next generation.</p> <img style="margin-bottom:16px" border=0 src="/media/44552/petri_2.gif" alt="" /> <h2>Controls</h2> <p>❎ (X): Cycle through display modes<br /> Enter/Pause: Display pause menu and adjust various game parameters</p> <h2>Additional Info</h2> <h4>Stats</h4> <p>Each cell has three stats: strength, agility, and speed.</p> <ul> <li><strong>Speed</strong> determines how likely a cell is to move</li> <li><strong>Strength</strong> determines how likely a cell is to consume energy each time it moves</li> <li><strong>Agility</strong> determines how likely a cell is to change direction each time it moves</li> </ul> <h4>Move Sets</h4> <p>Each cell has a move-set consisting of a list of numbers, 1-4, representing a cardinal direction.</p> <h4>Display Modes</h4> <p>The default display mode will output the number of living cells, the number of total births, the number of total dead cells, the amout of food currently in the environment, and the highest generation achieved.</p> <p>The text-based display mode outputs the stats of the most recently birthed cells. Move-sets for each cell are indicated by a band of pixels, each color representing a different direction.</p> <h4>Sounds</h4> <p>There are only two sounds effects in the game, one to indicate a birth, and one to indicate a death.</p> https://www.lexaloffle.com/bbs/?tid=141479 https://www.lexaloffle.com/bbs/?tid=141479 Sat, 06 Apr 2024 00:21:53 UTC Clouds Aloft <p> <table><tr><td> <a href="/bbs/?pid=95622#p"> <img src="/bbs/thumbs/pico8_clouds_v1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=95622#p"> Clouds Aloft</a><br><br> by <a href="/bbs/?uid=44552"> lewsidboi</a> <br><br><br> <a href="/bbs/?pid=95622#p"> [Click to Play]</a> </td></tr></table> </p> <p>I found myself flying across the Atlantic recently and tried to capture the vibe in a wee Pico8 vignette.</p> https://www.lexaloffle.com/bbs/?tid=44078 https://www.lexaloffle.com/bbs/?tid=44078 Tue, 03 Aug 2021 17:45:58 UTC Moon Missions <p> <table><tr><td> <a href="/bbs/?pid=83563#p"> <img src="/bbs/thumbs/pico8_moonmissions-9.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=83563#p"> Moon Missions</a><br><br> by <a href="/bbs/?uid=44552"> lewsidboi</a> <br><br><br> <a href="/bbs/?pid=83563#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Moon Missions</h1> <p>My take on a lunar lander game, for the Pico-8.</p> <h2>Features:</h2> <ul> <li>One obnoxious flying saucer</li> <li>A catchy intro tune</li> <li>Semi-procedural levels</li> <li>Persistent high scores</li> </ul> <h2>Directions:</h2> <p>Try to land your lunar vehicle on the surface of the moon while keeping an eye on your fuel<br /> and landing speed. Do your part to advance science (and boost your high score) by passing<br /> through each level's &quot;data&quot; waypoints. Keep an eye out for alien interface!</p> <p>Tip 1: When your landing speed is too high to land, warning lights flash from within your ship.<br /> Tip 2: Keep your eyes out for each level's fuel cannister to get some extra range and boost your score.</p> <p>Playable in browser at <a href="https://www.lexaloffle.com/bbs/?tid=40106">https://www.lexaloffle.com/bbs/?tid=40106</a></p> <h2>Controls:</h2> <ul> <li>Up/Left/Right to control directional thrusters</li> <li>(❎) can also be used as an alternate for up thrust</li> </ul> <h2>Credits:</h2> <p>This game was designed and created by me, lewsidboi, for you.</p> <p><a href="http://lewsid.com">http://lewsid.com</a></p> <img style="margin-bottom:16px" border=0 src="/media/44552/3_preview.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=40106 https://www.lexaloffle.com/bbs/?tid=40106 Sun, 01 Nov 2020 03:55:04 UTC Comparing numbers greater than 32,767 <p>How would I go about comparing numbers greater than 32,767?</p> <p>I'm using <a href="https://www.lexaloffle.com/bbs/?uid=12874"> @Felice</a>'s code from <a href="https://www.lexaloffle.com/bbs/?pid=22677">https://www.lexaloffle.com/bbs/?pid=22677</a>:</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>function get_score_text(val) local s = &quot;&quot; local v = abs(val) while (v!=0) do s = shl(v % 0x0.000a, 16)..s v /= 10 end if (val&lt;0) s = &quot;-&quot;..s if(s==&quot;&quot;) then s=&quot;0&quot; end return s end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I'm saving the three highest scores to the cart data. Unfortunately, I'm struggling to solve how to determine if the user's current high score (stored as a string) is greater than one of the other three. I'm looking for a function along these lines:</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>function check_new_high_score() --high_scores = table of tables { 1 =&gt; (player_name), 2 =&gt; (player score) } for i=1,#high_scores do local raw_high_score = get_score_text(config.total_score) local raw_saved_score = high_scores[i][2] if(raw_high_score&gt;raw_saved_score) then return i end end return false end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Unfortunately, yea, this just fails because I'm comparing strings to each other with a comparison operator. I'd love to know how to resolve this, I've been struggling with it for some time. Things end up in weird places:</p> <img style="margin-bottom:16px" border=0 src="/media/44552/Screen Shot 2020-10-07 at 6.51.12 PM.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=39858 https://www.lexaloffle.com/bbs/?tid=39858 Wed, 07 Oct 2020 22:48:26 UTC