camp39 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=92361 table behaviour in lua/pico <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>a = {x=10, y=25} b = a b.x = 99 print(a.x)</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 prints <code>99</code> but I assumed it would print <code>10</code>.<br /> I wrote code with a start table. Then I set a position table equal to the start table. I was hoping to update the position table but reset the position back to the start point at any time I wanted. I tested this out in php to make sure I wasn't crazy and it worked like I expected. I tried it out in strict Lua but it gave the result above. Why does Lua change the <code>a</code> table when I only changed the <code>b</code>? How do I deal with this?</p> https://www.lexaloffle.com/bbs/?tid=142102 https://www.lexaloffle.com/bbs/?tid=142102 Fri, 03 May 2024 23:49:34 UTC export sprite sheet <p>In pico-8, when I want to reuse a sprite sheet for a new cart, I would just<br /> copy/paste all the gfx and map data at the end of the file. It's not so simple<br /> in Picotron.</p> <p>How do I start a new cart in Picotron with an existing sprite sheet and map?</p> https://www.lexaloffle.com/bbs/?tid=142016 https://www.lexaloffle.com/bbs/?tid=142016 Mon, 29 Apr 2024 02:42:49 UTC Mate in 2 -- Volume 2 <p>Mate-in-2 Volume 2. 33 more puzzles. White to move. <table><tr><td> <a href="/bbs/?pid=147158#p"> <img src="/bbs/thumbs/pico8_matein2vol2-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=147158#p"> matein2vol2</a><br><br> by <a href="/bbs/?uid=92361"> camp39</a> <br><br><br> <a href="/bbs/?pid=147158#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=141898 https://www.lexaloffle.com/bbs/?tid=141898 Mon, 22 Apr 2024 23:58:04 UTC Mate In 2 -- Vol.1 <p> <table><tr><td> <a href="/bbs/?pid=144867#p"> <img src="/bbs/thumbs/pico8_matein2volume1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=144867#p"> matein2volume1</a><br><br> by <a href="/bbs/?uid=92361"> camp39</a> <br><br><br> <a href="/bbs/?pid=144867#p"> [Click to Play]</a> </td></tr></table> </p> <p>33 mate-in-2 puzzles. White to move. Will release more volumes.</p> https://www.lexaloffle.com/bbs/?tid=141199 https://www.lexaloffle.com/bbs/?tid=141199 Thu, 28 Mar 2024 16:50:37 UTC