Ahai64 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=74106 Can not call function matmul and matmul3d <p>(version 0.1.1d, Windows 10)</p> <p>I can not call function <code>matmul()</code> and <code>matmul3d()</code> directlly.</p> <p>At the same time, they can be called as a method of Class userdata</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>a=vec(1,2,3) b=vec(2,2,2) matmul(a,b,1) -- runtime error, attempt to call a nil value (global 'matmul') a:matmul(b,1) -- OK</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=54781 https://www.lexaloffle.com/bbs/?tid=54781 Thu, 13 Feb 2025 04:10:47 UTC Get Support to PICO-8/Picotron in VSCode <p>pico-api is a project consisting of definition files for the sumneko/lua extension for VSCode, allowing you to write PICO-8 or Picotron programs with the support of modern editor features.</p> <h3>Usage</h3> <ol> <li>Install and enable <a href="https://marketplace.visualstudio.com/items?itemName=sumneko.lua">sumneko/Lua</a> extensions in VSCode Marketplace</li> </ol> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/56_2024-10-27.png" alt="" /> <ol start="2"> <li> <p>Download the repo from Github(<a href="https://github.com/ahai64/pico8">pico8</a> or <a href="https://github.com/ahai64/picotron">picotron</a>)</p> </li> <li> <p>Put the folder <code>.vscode/</code> and <code>library/</code> into your workspace.</p> </li> <li> <p>Create Lua files in your VSCode workspace.</p> </li> <li>Create a cartridge and include the Lua file in it with:</li> </ol> <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>-- picotron cd(&quot;/myproj&quot;) include(&quot;main.lua&quot;)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <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>-- pico8 #include main.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>Then you can write code in the workspace of VSCode and enjoy code prompts, formatting, AI copilot, etc.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/2024-10-26 (4).png" alt="" /> <h3>Reference</h3> <p><a href="https://marketplace.visualstudio.com/items?itemName=sumneko.lua">https://marketplace.visualstudio.com/items?itemName=sumneko.lua</a></p> <p><a href="https://github.com/ahai64/pico8">https://github.com/ahai64/pico8</a></p> <p><a href="https://github.com/ahai64/picotron">https://github.com/ahai64/picotron</a></p> <p><a href="https://www.lexaloffle.com/bbs/?tid=53227">https://www.lexaloffle.com/bbs/?tid=53227</a></p> https://www.lexaloffle.com/bbs/?tid=53227 https://www.lexaloffle.com/bbs/?tid=53227 Sat, 26 Oct 2024 13:56:43 UTC understand = 14 <p> <table><tr><td> <a href="/bbs/?pid=129138#p"> <img src="/bbs/thumbs/pico8_understand14-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=129138#p"> understand14</a><br><br> by <a href="/bbs/?uid=74106"> Ahai64</a> <br><br><br> <a href="/bbs/?pid=129138#p"> [Click to Play]</a> </td></tr></table> </p> <p>Draw a line to fit the rules of the cells.</p> <p>You need to guess the rules by yourself.</p> <h3>TODO</h3> <ul> <li>more rules</li> <li>more levels</li> </ul> <h3>Credit</h3> <p>The idea of this game comes from</p> <ul> <li><a href="https://store.steampowered.com/app/1299400/Understand/">Understand</a></li> <li><a href="https://store.steampowered.com/app/1720850/AB/">A=B</a></li> <li><a href="https://store.steampowered.com/app/1865060/14/">14 Minesweeper Variants</a></li> </ul> https://www.lexaloffle.com/bbs/?tid=52549 https://www.lexaloffle.com/bbs/?tid=52549 Thu, 11 Jul 2024 06:16:45 UTC Colorful Snake <p> <table><tr><td> <a href="/bbs/?pid=140698#p"> <img src="/bbs/thumbs/pico8_snake_ahai_v2-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=140698#p"> Colorful Snake</a><br><br> by <a href="/bbs/?uid=74106"> Ahai64</a> <br><br><br> <a href="/bbs/?pid=140698#p"> [Click to Play]</a> </td></tr></table> </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/51_control1.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=139993 https://www.lexaloffle.com/bbs/?tid=139993 Sat, 27 Jan 2024 12:16:36 UTC We really need some new precautions for spams <p>It seems that Vietnamese find some way to easily hack the verification measures of Lexaloffle BBS.</p> <p>The superblog is full of ads now.</p> https://www.lexaloffle.com/bbs/?tid=53228 https://www.lexaloffle.com/bbs/?tid=53228 Sun, 15 Oct 2023 02:41:06 UTC Printh Easily with VSCode <p>I found a simple way to use printh on Windows without any setup by using Terminal in VSCode.</p> <h3>Using Lnk file</h3> <ol> <li>Drag and drop the lnk of PICO-8 into VSCode Terminal;</li> <li>Press Enter to run it;</li> <li>Use <code>printh</code> in PICO-8!</li> </ol> <p>Now printh will output its info to VSCode Terminal.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/printh with vscode.gif" alt="" /> <h3>Using p8 file in VSCode</h3> <p>And if you set pico-8.exe as the default program to open your p8 file, you can just drag and drop your p8 file in the VSCode to Terminal. It will open PICO-8 and load the cart and <code>printh</code> still works.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/50_1223.gif" alt="" /> <hr /> <p>Another way by editing lnk file: <a href="https://www.lexaloffle.com/bbs/?tid=42367">https://www.lexaloffle.com/bbs/?tid=42367</a></p> https://www.lexaloffle.com/bbs/?tid=51473 https://www.lexaloffle.com/bbs/?tid=51473 Tue, 05 Sep 2023 11:20:34 UTC A mistake in manual about coroutine <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> There is a mistake in the PICO-8 manual.</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>6.14 Additional Lua Features &gt; Coroutines &gt; costatus(c) Return the status of coroutine C as a string: &quot;running&quot; &quot;suspended&quot; &quot;dead&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>The status &quot;normal&quot; is missing.</p> <p>When coroutine A calls coroutine B, and you check the status of A in B, you will get &quot;normal&quot;.</p> https://www.lexaloffle.com/bbs/?tid=53312 https://www.lexaloffle.com/bbs/?tid=53312 Mon, 03 Jul 2023 06:38:01 UTC broken <p> <table><tr><td> <a href="/bbs/?pid=125416#p"> <img src="/bbs/thumbs/pico8_neretepisu-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=125416#p"> broken</a><br><br> by <a href="/bbs/?uid=74106"> Ahai64</a> <br><br><br> <a href="/bbs/?pid=125416#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=51515 https://www.lexaloffle.com/bbs/?tid=51515 Mon, 06 Feb 2023 16:47:25 UTC 2tris <p> <table><tr><td> <a href="/bbs/?pid=125219#p"> <img src="/bbs/thumbs/pico8_terufzoge-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=125219#p"> 2tris</a><br><br> by <a href="/bbs/?uid=74106"> Ahai64</a> <br><br><br> <a href="/bbs/?pid=125219#p"> [Click to Play]</a> </td></tr></table> </p> <h3>Controls</h3> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/44_control.png" alt="" /> <h3>Rules</h3> <p>Like Tetris, but you can erase cells in 2 directions.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/74106/22_anime.gif" alt="" /> <h3>Have fun! 😜</h3> https://www.lexaloffle.com/bbs/?tid=51458 https://www.lexaloffle.com/bbs/?tid=51458 Fri, 03 Feb 2023 03:46:26 UTC