kozm0naut [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=85395 Untitled Summoning Project <p>Ludum Dare 55 was last weekend and the theme was &quot;Summoning.&quot; I didn't really plan to compete in the jam but I thought I would try my hand at making something to fit an external idea.</p> <p>This is still <strong>not a game</strong> (I didn't stand a chance of getting anything done in 72hrs) but I thought I'd share what I have so far.</p> <img style="margin-bottom:16px" border=0 src="/media/85395/summoning_23.gif" alt="" /> <p>There are no enemies yet. Use the arrow keys to move, X to pick a summon and O to summon it for its cost. That's all there is.<br /> <table><tr><td> <a href="/bbs/?pid=146922#p"> <img src="/bbs/thumbs/pico8_koz_untitledsummoninggame-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=146922#p"> koz_untitledsummoninggame</a><br><br> by <a href="/bbs/?uid=85395"> kozm0naut</a> <br><br><br> <a href="/bbs/?pid=146922#p"> [Click to Play]</a> </td></tr></table> </p> <p>I'm not sure how much farther I will continue with it. The game would probably be a survivors-type crossed with diablo-summoner-esque gameplay in which your summons do all the fighting for you, with a little bit borrowed from tower defense. Also, bouncing.</p> <p><em>Credit goes to 2darray for aacirc() from <a href="https://www.lexaloffle.com/bbs/?pid=136646">Marble Merger</a></em></p> <p>Let me know what you think!</p> https://www.lexaloffle.com/bbs/?tid=141812 https://www.lexaloffle.com/bbs/?tid=141812 Fri, 19 Apr 2024 05:18:11 UTC Bouncy Ball <h1>Bouncy Ball</h1> <p> <table><tr><td> <a href="/bbs/?pid=145816#p"> <img src="/bbs/thumbs/pico8_bouncyball-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=145816#p"> bouncyball</a><br><br> by <a href="/bbs/?uid=85395"> kozm0naut</a> <br><br><br> <a href="/bbs/?pid=145816#p"> [Click to Play]</a> </td></tr></table> </p> <p><em>&quot;The depressing thing about tennis is that no matter how good I get, I'll never be as good as a wall.&quot;</em><br /> <table cellpadding=0 cellspacing=8>&nbsp; &nbsp; - Mitch Hedberg</table></p> <h2>Game Guide</h2> <h3>It takes a steady paddle...</h3> <p><em>The paddle imparts its speed on the ball</em>, so <strong>keep it steady</strong> or use this to your advantage to <strong>control the ball</strong>.. if you can keep up with it!</p> <h3>Modifiers</h3> <p><strong>Modifiers</strong> will refresh along the back wall <strong>every 5 bounces</strong>. Some will give you an <strong>advantage</strong>, others a <strong>disadvantage</strong>. Be careful what you land on!</p> <ul> <li><strong>Paddle Size</strong><br /> <table cellpadding=0 cellspacing=8><tr><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_5.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_5"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_5.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_5"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_5" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_6.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_6"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_6.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_6"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_6" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td></tr></table></li> <li><strong>Paddle Speed</strong><br /> <table cellpadding=0 cellspacing=8><tr><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_7.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_7"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_7.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_7"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_7" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_9.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_9"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_9.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_9"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_9" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td></tr></table></li> <li><strong>Ball Speed</strong><br /> <table cellpadding=0 cellspacing=8><tr><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_10.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_10"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_10.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_10"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_10" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_11.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_11"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_11.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_11"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_11" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td></tr></table></li> <li><strong>Gravity Wells</strong><br /> <table cellpadding=0 cellspacing=8><tr><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_12.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_12"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_12.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_12"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_12" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_13.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_13"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_13.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_13"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_13" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_14.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_14"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_14.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_14"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_14" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_15.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_15"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_15.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_15"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_15" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td></tr></table></li> <li><strong>???</strong><br /> <table cellpadding=0 cellspacing=8><tr><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_16.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_16"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_16.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_16"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_16" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td></tr></table></li> <li><strong>?????</strong><br /> <table cellpadding=0 cellspacing=8><tr><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_18.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_18"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_18.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_18"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_18" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_18.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_18"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_18.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_18"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_18" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td><td valign=top> <table><tr><td width=28> <img src="https://www.lexaloffle.com/bbs/gfxc/85395_18.png" width=28 height=28> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_85395_18"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/85395_18.txt", function (retdata){ var el = document.getElementById("gfxcode_85395_18"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [7x7]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_85395_18" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </td></tr><tr><td valign=top><strong>...??</strong></td></tr></table></li> </ul> <h2>Demo Mode</h2> <p><em>Bouncy Ball</em> includes a self-playing demo mode. Unlock up to <strong>4 CPU demo skill levels</strong> by playing!</p> <h2>Thanks to the PICO-8 community!</h2> <p>Big heartfelt thanks to <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> for making this wonderfully fun tool!<br /> Credit for nice smooth circles goes to <a href="https://www.lexaloffle.com/bbs/?uid=16330"> @2darray</a>: <code>aacirc()</code> is used from <a href="https://www.lexaloffle.com/bbs/?pid=136646">Marble Merger</a>.<br /> Thanks to everyone on the BBS and Discord for harboring such an amazing community!</p> <p>This is my first PICO-8 game release, and my second complete game release overall. I tried desperately to keep it as simple as possible in order to actually bring it to completion. As such, the game is <strong>only 4 colors!</strong>...</p> <p>...However, there <em>may or may not</em> be <strong>additional palettes</strong> included as hidden unlockables within the game...</p> <p><strong>Suggest a suitable (reasonable contrast) 4-color palette in the comments and I may just include it as a rare unlockable option, along with your name!</strong></p> <h3><strong>Have fun</strong> and <strong>post your high scores!</strong></h3> https://www.lexaloffle.com/bbs/?tid=141469 https://www.lexaloffle.com/bbs/?tid=141469 Fri, 05 Apr 2024 17:45:38 UTC BBS Superblog: all players play last cart <p>It appears that at the moment, playing any web player in the <a href="https://www.lexaloffle.com/bbs/superblog.php">Superblog</a> only plays the most recent cart run on the page since loading (whether PICO-8 or Picotron, regardless of player)</p> <img style="margin-bottom:16px" border=0 src="/media/85395/Screenshot 2024-03-20 10.02.58 AM.png" alt="" /> <p>This will eventually error out for Picotron webplayers attempting to load PICO-8 games.</p> https://www.lexaloffle.com/bbs/?tid=140936 https://www.lexaloffle.com/bbs/?tid=140936 Wed, 20 Mar 2024 14:45:56 UTC How to fully erase/reset cartdata? <p>Hi all, just getting started with saving player data.</p> <p><code>cartdata()</code> returns true or false depending on if there was existing cartdata or if it was just created. I am testing initialization of some default cartdata in the case that it returns false but I am having trouble testing this more than once per cartdata ID / per cart. I have tried wiping out 0x5e00-0x5eff with <code>memset(0x5e00,0,0xff)</code> but it doesn't seem to reset the boolean representing the presence of existing cartdata (unless I'm doing this wrong). Does anyone know if there is a way to fully delete/reset cartdata for a given cart/cart ID?</p> <p>Thanks!</p> https://www.lexaloffle.com/bbs/?tid=140583 https://www.lexaloffle.com/bbs/?tid=140583 Sun, 10 Mar 2024 06:40:34 UTC One-line minimap <p>This is pretty simple but I thought some devs might find it useful as an easy way to add a minimap to your game. It uses <code>tline</code> to draw a miniature version of the full map area to screen (during your _draw loop):</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>for i=0,64 do tline(0,32+i,128,32+i,4/8,4/8+i,1) 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>The representative pixel is drawn from the center (4/8,4/8) of each sprite, but you can alter this if you want a different selection.</p> <p>Here's an example of what this looks like in <a href="https://www.lexaloffle.com/bbs/?tid=2145">Celeste</a>:</p> <img style="margin-bottom:16px" border=0 src="/media/85395/celeste 1 0 fixed for p8 v0 1 2 _0.png" alt="" /> <p>And here's <a href="https://www.lexaloffle.com/bbs/?tid=52598">Air Delivery</a> with this line added:</p> <img style="margin-bottom:16px" border=0 src="/media/85395/air delivery_0.png" alt="" /> <p>Obviously it can be a bit messy raw, but it's accurate. For your own project, you could put this against a solid background color in your pause menu, for example. And then you might add an indicator for player position ;)</p> <p>I hope this can be useful out there!</p> https://www.lexaloffle.com/bbs/?tid=140478 https://www.lexaloffle.com/bbs/?tid=140478 Sat, 02 Mar 2024 19:38:00 UTC Tweetcart: Shimmerscale <h1>Shimmerscale</h1> <img style="margin-bottom:16px" border=0 src="/media/85395/shimmerscale_2.gif" alt="" /> <p>NOW IN GLORIOUS <strong>QUADRACOLOR</strong></p> <p>Consuming 239 chars because I didn't bother to minify further:</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>cls(13)s=sin a=12b=4 ::_:: t=time()/4 for i=0,36 do for j=0,42 do r=(i+1.4*j)/64 m=12*s(t+r) x=-8+4*i+3.4*s(t+r-.25) y=-20+4*j+8*s(r) if(btn(❎))a=11b=5 if(btn(πŸ…ΎοΈ))a=12b=4 o=a+(i/3+j/3+t*16)%b line(x,y-m,x+1,y-m+s(t+r+.75),o) end end goto _</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Press ❎ to activate <strong>CHROMATOSIS:</strong><br /> <em>An experimental bleeding-edge 5-color mode</em></p> <img style="margin-bottom:16px" border=0 src="/media/85395/shimmerscale p8_2.gif" alt="" /> <h3>Feel free to use/modify this effect for your projects!</h3> <p><code>a</code> is the starting color and <code>b</code> is how many subsequent colors in the palette to use, so you can alter this to use any colors you want using <code>pal({})</code> and those two variables. Note that the effect relies on not using <code>cls()</code> so this would be best suited to a splash screen or menu, or for use with <code>clip()</code></p> <img style="margin-bottom:16px" border=0 src="/media/85395/colorwave_5.gif" alt="" /> <p>*<em>angle also slightly modified for this example</em></p> https://www.lexaloffle.com/bbs/?tid=139933 https://www.lexaloffle.com/bbs/?tid=139933 Mon, 22 Jan 2024 19:12:11 UTC Tweetcart: Fire Dance <p>I've been working on a little tweetcart so that I might have something to actually release while still at work on more ambitious projects.</p> <p><span style="text-decoration: line-through;">I was able to get it down to 272 chars</span>. It runs at 60fps.</p> <p><strong>Edit</strong>: Used up the last few characters fixing a bug, refining the decay and adding some slight interactivity. Some chars can probably be reclaimed by combining the loops somehow (and using goto instead) but I'll probably just leave it at this.</p> <p>It starts slow and continues building over time. Enjoy!</p> <img style="margin-bottom:16px" border=0 src="/media/85395/tc280_fire p8_1.gif" alt="" /> <p> <table><tr><td> <a href="/bbs/?pid=139821#p"> <img src="/bbs/thumbs/pico8_tc_firedance-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=139821#p"> tc_firedance</a><br><br> by <a href="/bbs/?uid=85395"> kozm0naut</a> <br><br><br> <a href="/bbs/?pid=139821#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=55673 https://www.lexaloffle.com/bbs/?tid=55673 Mon, 08 Jan 2024 16:39:10 UTC BBS issue: mentions not working <p>Hi, I apologize that this is in the PICO-8 bugs category, but I don't see one for BBS bugs. For the last few days it would seem some (not all) @ mentions (e.g. <a href="https://www.lexaloffle.com/bbs/?uid=85395"> @kozm0naut</a>) have not turned to links as normal, and I'm not sure users are getting the usual notifications that they've been mentioned.</p> <p>Here are some recent posts in which @ mentions did not seem to work for me despite having the correct username:<br /> <a href="https://www.lexaloffle.com/bbs/?pid=139543#p">https://www.lexaloffle.com/bbs/?pid=139543#p</a><br /> <a href="https://www.lexaloffle.com/bbs/?pid=139504#p">https://www.lexaloffle.com/bbs/?pid=139504#p</a></p> <p>Thanks for reading, and happy new year!</p> https://www.lexaloffle.com/bbs/?tid=55595 https://www.lexaloffle.com/bbs/?tid=55595 Tue, 02 Jan 2024 17:55:39 UTC Q: Locality of for/in <p>Hello all, I'm still learning about PICO-8 and I'm interested in ensuring I understand the implications of using local variables, global variables or upvalues.</p> <p>As many do, I use a for/in loop to update my roster of enemies:</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> for en in all(ens) do local ecx,ecy,efov=en.x+2,en.y+3,0.1 --apply friction en.dx*=(en.dx&gt;0.05 or en.dx&lt;-0.05) and fric or 0 en.dy*=(en.dy&gt;0.05 or en.dy&lt;-0.05) and fric or 0 if (en.alert&gt;0) efov=0.3 --sees player? if (sees(ecx,ecy,pcx,pcy,50,en.fac,efov,2)) then --face toward player en.fac=atan2(pcx-ecx,pcy-ecy) --set terminus en.tx,en.ty=pcx,pcy en.alert=2 -- ...etc</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>My question is regarding the locality of the current element (&quot;en&quot; in the example above) and its constituent table elements. If I'm going to be reading en.x, en.dx, etc. multiple times within the loop, will it save cycles to make local copies of each of these first, or are they already local by being part of the current element (&quot;en&quot;)?</p> <p>Thanks!</p> https://www.lexaloffle.com/bbs/?tid=55326 https://www.lexaloffle.com/bbs/?tid=55326 Thu, 14 Dec 2023 18:54:29 UTC SpriteEdit: Paste/Undo doesn't undo flags <p>In the PICO-8 sprite editor, copying and pasting a sprite will copy the sprite's contents and flags, but using undo from this point will reverse the pasting of the sprite content but not the flags, leaving the flags set.</p> <p>Not a huge deal, but I thought I would point it out. Thanks!</p> https://www.lexaloffle.com/bbs/?tid=55143 https://www.lexaloffle.com/bbs/?tid=55143 Sun, 26 Nov 2023 20:21:16 UTC