ProgramGamer [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=27330 Terminal doesn't reset cursor to be visible after escape is pressed <p>When a cart is loaded and run &amp; then exited using escape, if that cart was capturing the mouse cursor or hiding it somehow, the terminal doesn't make it visible again, making it impossible to hold alt to click on a different workspace.</p> https://www.lexaloffle.com/bbs/?tid=150604 https://www.lexaloffle.com/bbs/?tid=150604 Tue, 29 Jul 2025 18:54:49 UTC :matmul returns true when passed true, breaks chaining <p>Like the title says, the return value of <code>:matmul</code>, when passed <code>true</code> to indicate that the result should be stored in itself, is that same boolean value. This is inconvenient since it breaks method chaining. Here's a small repro as proof:</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>-- declare vector &amp; metadata local v = vec(1, 2, 3) local m = userdata(&quot;f64&quot;, 3, 3) m:set(0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 ) -- ok, should return userdata ? &quot;return type 1: &quot;..type(v:matmul(m)) -- ok, stores result in copy local vcopy = v:copy() ? &quot;return type 2: &quot;..type(vcopy:matmul(m, vcopy)) -- prints boolean, breaks chaining local vcopy = v:copy() ? &quot;return type 3: &quot;..type(vcopy:matmul(m, true))</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=150065 https://www.lexaloffle.com/bbs/?tid=150065 Sat, 05 Jul 2025 16:34:36 UTC [solved] tline3d doesn't use w0 and w1 correctly <p>While working on a DOOM style 3D game, I came across what I'm fairly confident now is a bug in how <code>tline3d</code> uses the <code>w0</code> and <code>w1</code> parameters. To illustrate the issue (and because explaining what's happening is fairly difficult, I'm not certain myself exactly what's happening) I've created a reproduction cart which also contains an implementation of what I would have expected <code>tline3d</code> to do.</p> <p> <table><tr><td> <a href="/bbs/?pid=168942#p"> <img src="/bbs/thumbs/pico64_niyimakoye-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=168942#p"> niyimakoye</a><br><br> by <a href="/bbs/?uid=27330"> ProgramGamer</a> <br><br><br> <a href="/bbs/?pid=168942#p"> [Click to Play]</a> </td></tr></table> </p> <p>Press Enter or Start to toggle between the builtin implementation and my own.</p> https://www.lexaloffle.com/bbs/?tid=149720 https://www.lexaloffle.com/bbs/?tid=149720 Sun, 22 Jun 2025 01:53:15 UTC DOOM clone <h1>DOOM clone (WIP)</h1> <p>Early WIP of a DOOM-like 3D game, which I've simply named &quot;DOOM clone&quot; for now.</p> <p> <table><tr><td> <a href="/bbs/?pid=168858#p"> <img src="/bbs/thumbs/pico64_doomclone-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=168858#p"> doomclone</a><br><br> by <a href="/bbs/?uid=27330"> ProgramGamer</a> <br><br><br> <a href="/bbs/?pid=168858#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Controls</h2> <p>Primary stick: Move<br /> Secondary stick: Look (also mouse)<br /> Left/Right Bumper: Cycle through video modes<br /> P: Toggle CPU usage</p> <h2>Changelog</h2> <h3>Revision 2 (July 9th 2025)</h3> <p>Added ability to draw models made of textured triangles.</p> <h3>Revision 1 (June 27th 2025)</h3> <p>Added floors and ceilings and a performance counter.</p> <h3>Initial release</h3> <p>Walls &amp; basic movement are in, no collision yet.</p> <h2>Plans</h2> <p>I'm not sure what I want to do with this tech yet, but I knew the first step was to actually make a few functions that can draw the required 3D primitives. The engine can so far draw dots, bars, and walls in 3D space. The walls are perspective correct and get clipped by the near plane so there's no glitching when looking at walls from close up or at acute angles or anything. Primitives that are completely behind the camera even get culled.</p> <p>The next step will most likely be to implement a sector system (like in DOOM proper) so that a BSP can be created.</p> <p>Anyway, hope you enjoy what is ultimately a somewhat simple yet solid tech demo!</p> https://www.lexaloffle.com/bbs/?tid=149678 https://www.lexaloffle.com/bbs/?tid=149678 Fri, 20 Jun 2025 23:49:13 UTC Multi-byte equivalents of memset, analogous to peek/poke variants <p>Maybe a bit of a niche feature request, but it would be nice if we had memset variants for blocks of values that take up multiple bytes, like how peek &amp; poke now have variants for i16, i32, and i64 with peek2/poke2, peek4/poke4, and peek8/poke8 respectively. As it stands, initializing/filling a memory-mapped block of n values of anything other than bytes requires n instructions plus the cost of a for loop, so having the ability to reduce that to a single function call would be a great boon!</p> https://www.lexaloffle.com/bbs/?tid=149200 https://www.lexaloffle.com/bbs/?tid=149200 Mon, 26 May 2025 15:03:30 UTC