autopawn [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=93282 Possible cart data race-condition <p>Hello, I reported this race condition on itch.io but got no replies so I am posting it again here, in case somebody stumbles on it.</p> <p>This problem happens when the cart data is in use and the cartridge is quickly restarted.</p> <p>Consider the following 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>value = 0 frame = 0 function _init() cartdata(&quot;race_condition&quot;) value = dget(0) dset(0,0) -- set value to 0 for next reload with ctrl+r end function _update() if btnp(5) then dset(0, (value+1)%10) -- increase value by 1 run() -- reset cartridge end frame += 1 end function _draw() cls() print(&quot;current value: &quot;..value, value+1) print(&quot;frame: &quot;..frame) 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>If you look at it, the expected behavior would be that:</p> <ul> <li>If you press X, the stored value should increase by 1 (modulus 10) and then the cartridge should restart and load that value.</li> <li>If you reset with Ctrl+R, no value is set so it should be reset to 0 because of the dset(0, 0) at the end of the init.</li> </ul> <p>Notice however, that if you run the cartridge and press X, there are 3 possible outcomes:</p> <ul> <li>Value gets reset to 0.</li> <li>Value stays the same.</li> <li>Value increases by 1 as intended, but this only seems to happen if the cartridge ran for more than 60 frames.</li> </ul> <p>So my belief is that there is a race condition between the dset() calls of the different times the cartridge is reset, and they fight to write in the cart data.</p> <p>This behavior seems independent of the target platform, you can try it here:</p> <p> <table><tr><td> <a href="/bbs/?pid=149464#p"> <img src="/bbs/thumbs/pico8_zayihumope-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=149464#p"> racecond_test</a><br><br> by <a href="/bbs/?uid=93282"> autopawn</a> <br><br><br> <a href="/bbs/?pid=149464#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=142591 https://www.lexaloffle.com/bbs/?tid=142591 Wed, 05 Jun 2024 05:50:10 UTC murder_drones_virtual_training <p> <table><tr><td> <a href="/bbs/?pid=144326#p"> <img src="/bbs/thumbs/pico8_murder_drones_virtual_training-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144326#p"> Murder Drones Virtual Training 1.2.1</a><br><br> by <a href="/bbs/?uid=93282"> autopawn</a> <br><br><br> <a href="/bbs/?pid=144326#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is a <strong>hard</strong> action-platformer fangame based on the Murder Drones indie animated series by GLITCH. </p> <p>You play as a new disassembly drone that has to complete his training in a virtual environment.</p> <p><img loading="lazy" style="margin-bottom:16px" border=0 src="/media/93282/idwLD0.gif" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/93282/9KR0Ee.png" alt="" /></p> <h1>Controls</h1> <ul> <li>Arrow keys to move.</li> <li>[X] to flutter.</li> <li>[C] to shoot and detonate rockets (when available).</li> <li>[&darr;] to perform a dive maneuver.</li> <li>[Enter] for additional options.</li> </ul> <h1>Credits</h1> <ul> <li>Autopawn (Discord: autopawn)</li> <li>Remi Mixer (Discord: remimixer)</li> <li>Crj&ouml;nch (Discord: crjonch, Twitter: @Slimyappraisal)</li> <li>Miszuk (Discord: miszukuwu)</li> <li>Label character illustrations by @marshimiiu.</li> <li>Special thanks to our playtesters: Zanntendo, HenryV3, KleinerMuefffin, KaiChibi, Dragonod, VelvetNero, LostSoul3390, amogus, DeneralGumbass, Archer, Enchada, Herbat.</li> </ul> <p>Want to hear the OST? Check out the <a href="https://www.lexaloffle.com/bbs/?tid=148324">Boombox cart</a>!</p> <h1>Features</h1> <ul> <li>Over 10 levels of platforming action!</li> <li>Two levels of difficulty, NORMAL and HARD. The latter is indeed hard, don't say we didn't warn you!</li> <li>Several types of enemies, including a big, mean, <em>[REDACTED]</em>!</li> <li>Epic 8-bit music based on the show's.</li> <li>Many lines of dialog between the Rookie and his Supervisor.</li> </ul> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/93282/chibis_separated_2.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=141058 https://www.lexaloffle.com/bbs/?tid=141058 Sun, 24 Mar 2024 21:53:05 UTC