Felice [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=12874 Monospaced site font <p>Obviously I can only speak for myself, but I have to say I don't like the site's font having been changed to be universally monospaced. I really hope this was just a CSS accident. 😕</p> <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> - Was this intentional?</p> https://www.lexaloffle.com/bbs/?tid=141226 https://www.lexaloffle.com/bbs/?tid=141226 Fri, 29 Mar 2024 14:25:22 UTC Command line include/import/use <p>Yo <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>! I think I had a decent brainwave! And I think it's a good bang-for-buck in terms of using existing functionality to get something really useful.</p> <p>How hard would it be to add a command to the command prompt that simply does what <code>#include</code> does at runtime, i.e. executes some external PICO-8-compatible Lua in the current runtime environment?</p> <p>For instance, I could load <a href="https://www.lexaloffle.com/bbs/?uid=39676"> @Mot</a>'s <a href="https://www.lexaloffle.com/bbs/?tid=43955">cool variable inspector</a>, which is a live, ephemeral dev/debug tool, without having to cut and paste the code in three parts into the command line manually:</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>&gt; #include inspector.lua loading inspector.lua &gt; dinsp(myvar) [debugging intensifies]</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 think <code>#include</code> or even <code>include</code> might be a bit cumbersome for something a dev might want to type often, though. I thought of other alternatives like <code>`import</code>, but I think <code>use</code> might be the shortest verb that still makes sense in the context of an ephemeral-use tool. If we combine that short keyword with functionality that automatically tries to append <code>.lua</code>, that really cuts down the typing necessary at runtime:</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>&gt; use inspector loading inspector.lua</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'd also suggest that the command try <code>.p8</code> and <code>.p8.png</code> as well (not sure about order among the three), but it would only grab the lua section of the cart. This would make working on the dev tool itself a lot easier. It'd just be necessary for a tool author who wants a main loop to create it themself, rather than relying on <code>_update/_draw</code>, which they shouldn't be including since it would overwrite the game's functions.</p> <p>Another option might be a single-char prefix, similar to <code>?</code>, to execute something, maybe <code>!</code> like chatbot commands, and simultaneously switching the filename from a noun to a verb:</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>&gt; !inspect loading inspect.p8</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>That'd <em>really</em> be concise and quick.</p> <p>So, anyway...</p> <p>Whatcha think?</p> <p>😄<br /> 🙏🏻</p> https://www.lexaloffle.com/bbs/?tid=140514 https://www.lexaloffle.com/bbs/?tid=140514 Tue, 05 Mar 2024 23:25:45 UTC Maybe make stat(index,n) return a tuple like peek(addr,n)? <p>I realized that <code>stat()</code> is basically a <code>peek()</code> analogue for system status registers.</p> <p>To my knowledge, there is currently no functionality attached to the second arg onwards.</p> <p>Would it be a good idea to let <code>stat(index, n)</code> return an n-tuple just like <code>peek(addr, n)</code> does?</p> <p>It'd allow simplifications like this:</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>_update60() -- mouse stats _mx,_my,_mb=stat(32,3) -- or keep a fifo list of the last second's worth of mouse stats: deli(_m,#m) ins(_m,1,{stat(32,3)}) print(_m[16][3]) -- print the buttons 0.25 seconds ago -- or take a snapshot of all stat() values at the start of _update() -- (probably silly but you can imagine subsets being useful) _statshot={stat(1,255)} end _init() -- fifo used above _m={} for i=1,60 do _m[i]=0 end 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>Seems like a simple little QoL thing, I hope?</p> https://www.lexaloffle.com/bbs/?tid=55101 https://www.lexaloffle.com/bbs/?tid=55101 Tue, 21 Nov 2023 18:18:27 UTC Deprecated functions in demos <p>I notice <code>mapdraw()</code>, the deprecated name for <code>map()</code> got removed from <code>jelpi.p8</code> at some point, but it's still being used in <code>cast.p8</code>.</p> <p>Also, I see <code>band()</code> in <code>jelpi.p8</code> when we want people using the <code>&amp;</code> operator instead.</p> <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></p> <p>Maybe set up a script to grep the demos for the known-deprecated functions and just add new patterns whenever something is deprecated, then run the script before the each publish?</p> https://www.lexaloffle.com/bbs/?tid=54674 https://www.lexaloffle.com/bbs/?tid=54674 Sat, 21 Oct 2023 09:53:03 UTC Enhancement: Pass a truthy &quot;convert to numbers&quot; flag from split() to tonum() <p>Yo <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>By default, <code>split(str)</code> has a go at each split element to see if it's possibly a number, presumably using <code>tonum(elem)</code>. You can disable this with <code>split(str, false)</code> or <code>split(str, delim_or_width, false)</code>. </p> <p>Unfortunately, unlike <code>tonum(str, 1)</code>, you can't hint the format of the number, like I could by saying <code>tonum(&quot;fe&quot;, 1)</code> to get 254 aka 0xfe. I tried replacing the <code>split()</code> boolean arg with a number, but it didn't seem to get passed through.</p> <p>I don't know if you're actually using <code>tonum()</code> inside <code>split()</code>, so maybe I'm assuming too much, but if you are, could you just pass any numeric conversion flag direct to it? That'd let us convert hex directly to numbers with something like <code>split(&quot;baadf00d&quot;, 4, 1)</code> returning {-17747,-483}.</p> https://www.lexaloffle.com/bbs/?tid=52432 https://www.lexaloffle.com/bbs/?tid=52432 Mon, 17 Apr 2023 03:27:00 UTC Problem with poke() return value <p>Hey <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>Do I remember right? I think when I asked for state-changing funcs like color() or clip() to return the previous state, I'm pretty sure poke() (and its 2/4 friends) was one of them. Seems like it always returns 0 now.</p> <p>(Also, if it's meant to return the previous state, remember to return a tuple of old values if you're given a tuple of new values.)</p> https://www.lexaloffle.com/bbs/?tid=52199 https://www.lexaloffle.com/bbs/?tid=52199 Tue, 28 Mar 2023 12:49:32 UTC Bug: DRAW_TABS not actually in CONFIG (sort of) <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></p> <p>Okay, so the functionality is there, but you forgot to add it to the list you get if you type <code>config</code> by itself. Currently this is all you get:</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>&gt; config config [setting] available settings: volume theme gif_len gif_reset_mode gif_scale screenshot_scale splore_filter tab_width</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Might wanna check and make sure there aren't any other additions you've missed adding here.</p> https://www.lexaloffle.com/bbs/?tid=51472 https://www.lexaloffle.com/bbs/?tid=51472 Sat, 04 Feb 2023 08:48:05 UTC Bug: Exported app launches offscreen <p>Hey <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>I tried exporting and running an app, didn't do anything special except to load up a working cart and type &quot;export blahblah.bin&quot; and then run the resulting executable from the blahblah.bin/windows/ folder, and the window came up offscreen.</p> <p>I used some tools and also some estimates to figure out where the app actually came up, and I'm pretty sure it's because I have a rather uncommon desktop arrangement.</p> <p>Here's an image showing my desktop arrangement from Windows' display settings, with all of the extra info I found/deduced annotated and the position of the exported app when it launches. I hope this helps you figure out where you, e.g. copy/pasted some math and flipped or repeated a coordinate:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/12874/pico-8_exported_app_bad_desktop_coords.png" alt="" /> <p>(sorry, it's hard to write with a mouse)</p> <p>Also, just in case it matters, I launched the app from a windows explorer window on the center/primary monitor.</p> <p>Let me know if I can offer up any more info to help you track this down.</p> https://www.lexaloffle.com/bbs/?tid=50935 https://www.lexaloffle.com/bbs/?tid=50935 Sun, 01 Jan 2023 09:28:35 UTC BBS Bug: @ breaks external URLs <p>The post formatter is putting the &quot;@user&quot; concept at too high a priority. It screws up Mastodon links, and also adds an extra space for no reason I can tell. Edit: Even on this line, the &quot;@user&quot; placeholder has an extra space in front of it that I didn't type.</p> <p>Here's a link to one of your posts, just pasted as plaintext, to use as an example of how garbled it can get:</p> <p><a href="https://mastodon.social/@zep/109507080931110623">https://mastodon.social/@zep/109507080931110623</a></p> <p>Here it is as an inline code blurb <code>https://mastodon.social/@zep/109507080931110623</code>.</p> <p>Here it is inside a code block:</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>https://mastodon.social/@zep/109507080931110623</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 is what I actually typed, as an image:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/12874/bbs_bug.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=50914 https://www.lexaloffle.com/bbs/?tid=50914 Fri, 30 Dec 2022 20:30:49 UTC Suggestion: Better way to enter/exit puny mode <p>Just gonna repeat what I <a href="https://tinyurl.com/2xkwmu4m">said on mastodon</a>:</p> <hr /> <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a><br /> I just had what MIGHT be a good idea. Emphasis on &quot;MIGHT&quot;.</p> <p>Currently PICO-8 does not honor the concept of insert/overwrite mode like DOS used to. Indeed, many programs don't.</p> <p>How about using the [Ins] key to toggle puny mode?</p> <p>This post was brought to you by <strong>People Like You and Me Who Hate Doing Ctrl-key Sequences&trade;</strong>.</p> <hr /> <p>Also it'd be nice if you followed this common PC editor convention so I won't need to fake it with AutoHotKey:</p> <p>shift-del = cut<br /> shift-Ins = paste<br /> ctrl-ins &nbsp; = copy</p> <p>So much easier to use on the fly. I learned this and never went back to ctrl-x/c/v.</p> https://www.lexaloffle.com/bbs/?tid=50913 https://www.lexaloffle.com/bbs/?tid=50913 Fri, 30 Dec 2022 20:18:11 UTC Suggestion: Once finalized, give us a poke() that swaps to Picotron palette <p>Hey <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>I think it'd be really nice to allow us to swap in the 32-color Picotron palette, which has the 16-color PICO-8 palette plus the revised upper 16 colors that you've been carefully tweaking for Picotron's system palette.</p> <p>I'm gonna bet that the iteration you're doing with them to improve usefulness would be really nice for PICO-8 games, and would additionally homologize the two platforms with respect to color palettes.</p> <p>Maybe just a single bit somewhere that swaps out the secret palette for Picotron's 16..31 colors?</p> <p>Or, I suppose, you could subdivide one of the two ranges. You'd still want an enable bit though, since people rely on index bits 4,5,6 not mattering.</p> <p>In fact, what the enable bit could do would be to switch to using the same indices 0..31 Picotron uses, instead of 0..15 and 128..143 on PICO-8, and then that's just the Picotron system palette. Basically a Picotron-palette mode.</p> <p>That'd make using the extra colors a lot less cumbersome than using the current secret palette, though the original secret palette could still live above 128 at the same time too, in which case all the enable bit would do would be to put picotron_pal[16..31] into pico8_pal[16..31] and everything else would remain the same.</p> <p>I dunno, just throwing out ideas here. What do you think? Does any of this sound reasonable?</p> https://www.lexaloffle.com/bbs/?tid=50584 https://www.lexaloffle.com/bbs/?tid=50584 Sat, 10 Dec 2022 02:29:01 UTC `config draw_tabs 1` would be nice <p>Yo <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>It'd be nice if <code>draw_tabs</code> were one of the options in the <code>config</code> command.</p> <p>Indeed, it would probably be a good idea to do a once-over on the whole config.txt and see what else would be good to add to the command.</p> <p>I say this because someone noted on Discord that there's no way to make tab characters visible on the edu version. Probably among other things that people on the edu version would benefit from.</p> <p>Personally, I love visible tab characters, so I want everyone to have the option to try them.</p> <p><em>Edit: as requested below, for anyone unsure what I'm talking about, here's a sample image with <code>draw_tabs</code> set to 1 (and also <code>tab_width</code> set to 2). Note the wine-colored vertical line at the left edge of the tab characters, which also neatly masquerade as scope guides.</em></p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/12874/untitled_8_0.png" alt="" /> <hr /> <p>(Also edit: Woo, BBS thread #50000.)</p> https://www.lexaloffle.com/bbs/?tid=50000 https://www.lexaloffle.com/bbs/?tid=50000 Tue, 01 Nov 2022 13:33:30 UTC Token cost imbalance in declarations <p>It's not intuitive that these two blobs of code have different token costs, even though they do exactly the same thing:</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>local a = 1 -- 3 tokens: a, =, 1 local b -- 1 token: b b = 1 -- +3 tokens b, =, 1 -&gt; total 4 tokens</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 think the disconnect here is that the <code>b</code> in <code>local b</code> is being treated in the cost analysis as a variable reference, which it isn't, because the variable isn't referenced or assigned. It's just forward-declaring a conceptual attribute of the variable (its name), like the zero-cost <code>local</code> keyword does (its scope).</p> <p>The reason why this bothers me is that I often find myself doing stupid stuff so I can do tuple assignments to save a token, which makes my code ugly. Gross stuff like re-using existing vars or function args, rather than declaring a new local, so I can put them all on the same tuple-assigning line without having to split out a new token-stealing &quot;local&quot; declaration that wouldn't work inline with the tuple assignment.</p> <p>Here's a really-contrived example you'd never actually write, but hey, I need an example:</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 if_period_at_start_move_to_end( s ) assert(#s &gt;= 2) local p -- this forward declaration is necessary p, s = s[1], sub(s, 2) -- because we can't mix declare-assign with re-assign here if p == &quot;.&quot; then -- put it where it should be s = s..p else -- phew it wasn't a period, put it back s = p..s 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>Granted I could simply use <em>two</em> new vars when I take the potential period off of the front of the string, thereby allowing myself to merge the <code>local</code> declaration into the tuple assignment, but I guess that just feels like stack clutter to me. I know, nit-picky, but still... it's the little things.</p> <p>Anyway, unless there's some reason why it would be <em>bad</em> to nix the cost of an empty declaration, would this be an acceptable tweak? I did try to think of some harm or abuse that could come of being able to forward-declare a bazillion locals for free, but the only problem I could see would be in the head of the author who did it.</p> <p>And, like... at heart, the argument is just that <code>local a = 1</code> and <code>local a; a = 1</code> are functionally identical, which I'd hope would be enough in the first place. The rest of the above is just me trying even harder to make a case which I think is already made.</p> https://www.lexaloffle.com/bbs/?tid=49933 https://www.lexaloffle.com/bbs/?tid=49933 Thu, 27 Oct 2022 14:20:59 UTC Indexing a string out of bounds should return nil <p>Yo <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>I realize returning <code>nil</code> out of bounds is less &quot;friendly&quot;-seeming, but after reading another <a href="https://www.lexaloffle.com/bbs/?pid=118912#p">post</a> in here, I realized it's way more useful.</p> <p>For one thing, it should make this work:</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>plain_text = &quot;my thing that is mine&quot; label = &quot;&quot; for c in all(plain_text) do if c == ' ' then label ..= '_' else label ..= c end end print( label ) -- &quot;my_thing_that_is_mine&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>(Right now it never stops because the iterator keeps seeing <code>&quot;&quot;</code> instead of the <code>nil</code> it needs to terminate.)</p> <p>And for another, returning a nil is much more likely to alert a programmer that their code is probably malfunctioning than returning an empty string. Accessing out of bounds is <em>usually</em> erroneous and should therefore trigger errors.</p> <p>I realize some apps are probably already abusing the fact that you get an empty string when referencing past the end of the string, but really that's a bad programming pattern to be teaching people anyway. It's lazy, you should know where the end of the string is and stop there instead of expecting the OS/API to be your nanny and stop you from walking off of a cliff.</p> <p>Presumably this should apply to negative offsets as well, meaning negative offsets big enough to go back past the start of the string.</p> https://www.lexaloffle.com/bbs/?tid=49902 https://www.lexaloffle.com/bbs/?tid=49902 Tue, 25 Oct 2022 00:37:59 UTC Web player needs a volume control <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></p> <p>Every now and then I get directed to a BBS post with a cart that I genuinely to see, but which is making my headphones screech into my ears because it's so loud.</p> <p>Thing is, I already have both my system volume and my app-specific browser volume set to sensible levels for all other content, so I can't reasonably dial down the volume pre-emptively.</p> <p>Unfortunately, sometimes it's appropriate for a game to do something loud, albeit <em>briefly</em>, so I wouldn't expect you to limit it in the player either.</p> <p>Really, I think the solution is to have a slider of some sort on the web player. Even if it's limited to 8 different levels, like PICO-8 is internally, that'd help.</p> <p>Maybe if the user right-clicks (or presses and holds) on the speaker icon, it pops up a slider that can be adjusted?</p> <p>I dunno if it should be persistent and/or global. For reference, Youtube seems to be both, i.e. the most recent change you made becomes the default for the next video, regardless of how many windows you have open with different settings.</p> <p>Thanks!</p> https://www.lexaloffle.com/bbs/?tid=47853 https://www.lexaloffle.com/bbs/?tid=47853 Wed, 18 May 2022 06:30:49 UTC Unbalanced API: pairs vs. ipairs <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></p> <p>Hey! Remember when I suggested putting <code>next</code> in the globals, since we could get to it anyway by doing <code>next=pairs{}</code>? You did! And that's been great!</p> <p>Would it be okay to get <code>inext</code> the same way? It seems to be present, since I can get it by (similarly) doing <code>inext=ipairs{}</code>, and it seems to work the same way, just limited to index,value instead of key,value.</p> <p>It's just not <em>officially</em> exposed.</p> <p>I'm asking because there's a token saved when you switch from the first to the second implementation here:</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 k,v in pairs(t) do ... end for i,v in ipairs(t) do ... end -- these are a little less clear to the reader but they work the same and save a token for k,v in next,t do ... end for i,v in inext,t do ... 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>Technically it also shaves a couple of cycles off of the loop setup by inlining the return tuple from pairs()/ipairs(), but it's really the token savings that would be handy in some cases.</p> https://www.lexaloffle.com/bbs/?tid=47314 https://www.lexaloffle.com/bbs/?tid=47314 Sat, 09 Apr 2022 09:47:03 UTC Bug? Table stringifies differently if it has a metatable <p>I don't know if this is expected behavior, but I thought I should ask:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/12874/metatable.png" alt="" /> <p>Is it expected that stringifying the table var/ref will give different results when it has a (blank?) metatable attached?</p> https://www.lexaloffle.com/bbs/?tid=47165 https://www.lexaloffle.com/bbs/?tid=47165 Wed, 30 Mar 2022 18:59:54 UTC PICO-8 should NOT receive input when it's not the focused window <p>&gt; <em>Changed: Controller inputs are accepted even when PICO-8 is not the foreground application</em></p> <p>PLEASE change this back. This is totally counter to how apps are supposed to work in a windowing environment. If an app doesn't have focus, the whole <em>point</em> is that it's not the one receiving input.</p> <p>This is causing problems for me already because I can't safely pause a PICO-8 game while I play something else that uses a controller.</p> https://www.lexaloffle.com/bbs/?tid=46362 https://www.lexaloffle.com/bbs/?tid=46362 Sat, 29 Jan 2022 11:11:28 UTC Hitomezashi w/ Voronoi cells <p>I saw <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>'s <a href="https://twitter.com/lexaloffle/status/1477189236919255040?s=20">tweetcart</a> and wanted to fiddle with it to produce something like the pattern on <a href="https://twitter.com/lexaloffle/status/1477192868645466117?s=20">the bag</a> he showed in the thread. I use Voronoi cells to apply multiple patterns to each image.</p> <p>Unfortunately, with the limited resolution, our eyes can't pick out patterns unless they are at least half the size of the screen and very regular, so I had to use a limited number of cells with a reduced amount of randomness in each pattern. It sorta works, but it'd be way more effective on a hi-res screen with more cells.</p> <p> <table><tr><td> <a href="/bbs/?pid=104012#p"> <img src="/bbs/thumbs/pico8_rajadadaji-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=104012#p"> zep's hitomezashi with voronoi cells</a><br><br> by <a href="/bbs/?uid=12874"> Felice</a> <br><br><br> <a href="/bbs/?pid=104012#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=45948 https://www.lexaloffle.com/bbs/?tid=45948 Sat, 01 Jan 2022 12:28:51 UTC Suggestion: &quot;backups&quot; command <p>Yo <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>,</p> <p>On discord and here on the BBS, we get a lot of people who basically need to get to the auto-backup of a cart they've lost somehow. It'd spare a lot of time writing blurbs like <a href="https://www.lexaloffle.com/bbs/?pid=95617#p">this</a> if people could simply type &quot;backups&quot; and have it work like the &quot;folder&quot; command except it drops them in the 'backups' folder instead of 'carts'.</p> https://www.lexaloffle.com/bbs/?tid=44075 https://www.lexaloffle.com/bbs/?tid=44075 Tue, 03 Aug 2021 16:39:43 UTC