56bitsago [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=43814 Confused about rounding error <p>Hi, I'm confused about the following. In my platformer game I apply a 0.85 factor to dx as friction. When I do this on a negative dx value (i.e. player moving to the left) dx never reaches zero and is represented as -0 (minus zero).</p> <p>When I use that dx value by adding it to x, the x value keeps counting down a tiny fraction on every update.</p> <p>I can work around it of course (e.g. setting it to 0 when abs(dx) is smaller than 0.0002), but I'd love to understand what's actually happening here. All pointers are appreciated :)</p> <p>You can see it in action here:<br /> <table><tr><td> <a href="/bbs/?pid=77461#p"> <img src="/bbs/thumbs/pico8_yipobarode-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=77461#p"> yipobarode</a><br><br> by <a href="/bbs/?uid=43814"> 56bitsago</a> <br><br><br> <a href="/bbs/?pid=77461#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=38227 https://www.lexaloffle.com/bbs/?tid=38227 Sun, 31 May 2020 19:30:29 UTC Switch Macbook to sleep with Joystick connected: cURL metrics + segfault <p>When I let my Macbook (Catalina 10.15.4) sleep while having a joystick (8BitDo SN30 Pro+) connected PICO-8 segfaults, and outputs some cURL transfer metrics just before that:</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>[127,14] set sprite: 0 [127,15] set sprite: 0 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 177k 0 177k 0 0 99737 0 --:--:-- 0:00:01 --:--:-- 99682 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 41674 0 41674 0 0 77750 0 --:--:-- --:--:-- --:--:-- 77750 Segmentation fault: 11</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>(Note: first two lines are debug output from my cart).</p> <p>Does anyone know why PICO-8 does a cURL call actually? Does it auto-report bugs or perhaps it checks for new versions?</p> https://www.lexaloffle.com/bbs/?tid=37559 https://www.lexaloffle.com/bbs/?tid=37559 Fri, 24 Apr 2020 08:03:09 UTC