MBoffin [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=10198 Unable to disable &quot;Pauseable&quot; in fullscreen apps <p>Using <code>window{pauseable=false}</code> in fullscreen apps does not disable the ability to pause by hitting ENTER.</p> <p>Steps to reproduce:<br /> 1) Boot Picotron.<br /> 2) Add this code to main.lua (as per the 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>window{ pauseable=false } function _draw() cls() print(t()) 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>3) Run it.<br /> 4) Try to pause by hitting ENTER.<br /> 5) Watch in helpless grief as you continue to fail to pause, despite mashing ENTER over and over and over.</p> <p>Oh yeah, and another thing I noticed. <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>, the Proggy demo is now kinda broken since you can't type anything in the editor window without it popping up the pause menu every time you hit ENTER. (I noticed when trying to use my Froggy app today and realized that would affect Proggy too.)</p> https://www.lexaloffle.com/bbs/?tid=142086 https://www.lexaloffle.com/bbs/?tid=142086 Fri, 03 May 2024 03:18:41 UTC PICO-8 Features in Picotron Wishlist <p>I know there is still so, so much yet to add in Picotron, but there are quite a few features PICO-8 has that would be so nice to also have in Picotron. I imagine a non-zero percentage of these are probably already on some official/unofficial/mental roadmap that <a href="https://www.lexaloffle.com/bbs/?uid=1"> <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></a> keeps for Picotron. Nevertheless, I thought I'd list some here just to get them &quot;on paper&quot; and not floating around in my head. Feel free to contribute your own items to this list.</p> <p>Keep in mind, I have <strong><em>zero</em></strong> expectation that <em>any</em> of these ever actually get added, let alone added soon. So if you decide to contribute to this list, keep in mind the vibe here is more &quot;ooh, that'd be neat if Picotron did this too&quot; rather than &quot;why doesn't Picotron have this feature?!&quot;</p> <p><strong><em>EDIT: Wow! A lot of these got added in the latest version of Picotron! (v0.1.0h) I've updated the list below to indicate what's now been added to Picotron. Thanks, <a href="https://www.lexaloffle.com/bbs/?uid=1"> <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></a>! 🤩</em></strong></p> <ul> <li>Having the option to show tab character indicators</li> <li>Alt-up and alt-down jumping you one function up or down at a time</li> <li>Showing the color number when moving the mouse over a color in the palette in the sprite editor</li> <li>Being able to use the numpad ENTER key and not just the main ENTER key</li> <li> <p>R to rotate sprites in the sprite editor. Obviously would only work if the sprite was square. But if the sprite wasn't square, maybe swapping the length and width to allow rotation of non-square sprites?</p> </li> <li><strong>DONE!</strong> <del>Ctrl-E to go to end of the line (via <a href="https://www.lexaloffle.com/bbs/?uid=57071"> @ooooggll</a>)</del></li> <li><strong>DONE!</strong> <del>Ctrl-D to duplicate the current line</del></li> <li><strong>DONE!</strong> <del><code>fget(sprite_num)</code> also supporting the <code>fget(sprite_num, flag_num)</code> overload</del></li> <li><strong>DONE!</strong> <del>Shift-Enter auto-adding a closing <code>end</code> and then indenting</del></li> <li><strong>DONE!</strong> <del>Ctrl-clicking a tile in the map editor to replace <em>all</em> instances of that sprite with the currently selected sprite (not the same as the paint bucket)</del></li> <li><strong>DONE!</strong> <del>At the beginning of a line, if you hold shift and press the down arrow to select that line, having it select the entire line <em>and</em> the line break at the end, instead of <em>just</em> the text of the line with no trailing line break</del></li> <li><strong>DONE!</strong> <del>Having the cursor &quot;remember&quot; what character position it was at as you move up and down lines, even if it moves onto a line without enough characters to go back to the same horizontal position. It's hard to describe, but here's a GIF of what it does in PICO-8 and what it doesn't do in Picotron:</del></li> </ul> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/pico8_cursor.gif.gif" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/picotron_cursor.gif.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=142067 https://www.lexaloffle.com/bbs/?tid=142067 Wed, 01 May 2024 21:22:41 UTC loadcart: A command-line tool for loading carts from a saved folder <p>I usually keep all my carts in a specific folder in Picotron, but it's annoying having to cd into that folder every time I want to load a cart, or type the whole path out. I'd rather just be able to load carts from that folder from anywhere in the filesystem.</p> <p>So, I made <code>loadcart</code>. It's like <code>load</code> (and even uses <code>load</code> to do the actual loading), but you can run it from anywhere and it'll always load from a folder you specify. (It will default to <code>/desktop</code> if you don't set a folder.)</p> <p>Let's say <code>/desktop/carts</code> is where you store all your carts. You'd run <code>loadcart -d /desktop/carts</code> at some point to set loadcart's saved folder. Now, from that points on, from anywhere in your filesystem, you can type <code>loadcart mycart</code> and it would be the same as running <code>load /desktop/carts/mycart.p64</code>.</p> <p>Here's the contents of the <code>.lua</code> file. Just save it to <code>/appdata/system/util/loadcart.lua</code>. When you run it with the <code>-d</code> switch, the saved folder will be set in <code>/appdata/loadcart.pod</code>.</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 loading carts from a specific saved folder. ]] function print_usage() print(&quot;\f6usage:\t\tloadcart filename\n\t\t\t\tcan be file or directory\n&quot;) print(&quot;\f6\t\t\tloadcart -d directory_name\n\t\t\t\tsets carts directory (defaults to \&quot;/desktop\&quot;)\n&quot;) if (fstat(&quot;/appdata/loadcart.pod&quot;)) then local meta = fetch_metadata(&quot;/appdata/loadcart.pod&quot;) if (fstat(meta.dir) == &quot;folder&quot;) then print(&quot;\f6current: &quot;..meta.dir) else print(&quot;\f6current: /desktop&quot;) end else print(&quot;\f6current: /desktop&quot;) end end --show help local e = env() local argv = e.argv if (#argv &lt; 1 or #argv &gt; 2) then print_usage() exit(1) end --load cart based on settings or default to /desktop if (#argv == 1) then if (argv[1] == &quot;-d&quot;) print_usage() exit(1) local dir = &quot;/desktop&quot; if (fstat(&quot;/appdata/loadcart.pod&quot;) == &quot;file&quot;) then local meta = fetch_metadata(&quot;/appdata/loadcart.pod&quot;) if (meta.dir and fstat(meta.dir) == &quot;folder&quot;) then dir = meta.dir else print(&quot;\f6invalid directory setting, defaulting to /desktop&quot;) end end cd(dir) create_process(&quot;/system/util/load.lua&quot;, { print_to_proc_id = e.print_to_proc_id, argv = {fullpath(argv[1])} } ) exit(0) elseif (#argv == 2) then cd(e.path) if (argv[1] == &quot;-d&quot;) then local directory = fullpath(argv[2]) if (fstat(directory) == &quot;folder&quot;) then store(&quot;/appdata/loadcart.pod&quot;,&quot;&quot;,{title=&quot;loadcart utility settings&quot;,dir=directory}) print(&quot;\f6loadcart set to: &quot;..directory) exit(0) else print(&quot;invalid directory&quot;) exit(1) end else print_usage() exit(1) 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> https://www.lexaloffle.com/bbs/?tid=141881 https://www.lexaloffle.com/bbs/?tid=141881 Mon, 22 Apr 2024 15:57:50 UTC [SOLVED] Running terminal utils from other terminal utils with output? <p>I'm trying to run a <code>/system/util</code> command from my own custom <code>/appdata/system/util</code> command, but I can't seem to get the output from the <code>/system/util</code> to show up when I run it.</p> <p>For example, let's take a dumb example and pretend I want a custom command called <code>sys_ls</code> to list the contents of the system folder. I would <em>think</em> my <code>/appdata/system/util/sys_ls.lua</code> would look 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>create_process(&quot;/system/util/ls.lua&quot;, { argv = {&quot;/system&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>And then running <code>sys_ls</code> <em>should</em> spit out the same output as if I ran <code>ls /system</code>. But it doesn't. Instead it outputs nothing at all.</p> <p>Any idea how to get the called command's output to actually display in terminal along with any other output from a custom command?</p> https://www.lexaloffle.com/bbs/?tid=141869 https://www.lexaloffle.com/bbs/?tid=141869 Sun, 21 Apr 2024 19:37:38 UTC btn() wut? [Solved: PEBKAC] <p> <table><tr><td> <a href="/bbs/?pid=146003#p"> <img src="/bbs/thumbs/pico64_btnwut-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=146003#p"> btnwut</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=146003#p"> [Click to Play]</a> </td></tr></table> </p> <p>I cannot figure out what's happening with <code>btn()</code>. It seems totally random. I made this cart so you can see. I thought it was supposed to imitate PICO-8's <code>btn()</code> function, but that's clearly not happening.</p> <p>Also, if anyone knows how to get data from different controllers, please share. Usually I would do something like <code>btn(btn_num, controller_num)</code> but with <code>btn()</code> acting the way it is... 🤷😂</p> https://www.lexaloffle.com/bbs/?tid=141534 https://www.lexaloffle.com/bbs/?tid=141534 Sun, 07 Apr 2024 22:56:55 UTC Feature Request: &quot;-home [path]&quot; commandline parameter <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> It would be hugely helpful if we had a <code>-home [path]</code> commandline parameter for Picotron. I'll describe how I currently have it set up for PICO-8, so you can see how it would be helpful for Picotron:</p> <p>&gt; Computer lab environment, with each computer having Google Drive installed. (Installing Google Drive locally is like Dropbox, but for Google Drive. Basically gives you a G-Drive on your computer that is direct local access to your Google Drive files and folders, so you can, say, save directly from Notepad into your Google Drive.)<br /> &gt;<br /> &gt; PICO-8 is installed on each computer, but the desktop shortcut to launch PICO-8 uses the <code>-home</code> commandline parameter to point the home folder to <code>c:\pico8</code> instead of the user's profile folder. Inside <code>c:\pico8</code> are folder symlinks for <code>carts</code> and <code>images</code> that point to corresponding folders in <code>G:\My Drive\pico8</code>. Then the <code>c:\pico8\config.txt</code> points <code>desktop_path</code> and <code>root_path</code> to <code>./images</code> and <code>./carts</code>, respectively.<br /> &gt;<br /> &gt; This means no matter which computer they use, <code>c:\pico8\carts</code> <em>always</em> points to <em>their</em> <code>carts</code> folder in <em>their</em> G-Drive. And because their carts are saved to the cloud, they're not locked to using a specific computer and they can even access carts from home.</p> <p>This works beautifully.</p> <p>However, with Picotron having no <code>-home</code> commandline parameter, each student is now locked to having to use a specific computer if they want to use Picotron because on each computer, a separate <code>picotron_config.txt</code> gets created for each student that logs in, rather than just being able to simply have the Picotron desktop shortcut globally point to the single <code>c:\picotron</code> folder and pick up the global config file in there.</p> <p>I hope this makes sense. It would be hugely helpful to have this feature.</p> <p>Or, in place of a <code>-home</code> parameter, having a <code>-mount</code> parameter that supersedes whatever is in the <code>picotron_config.txt</code> file would work too. Then I could just make the desktop shortcut use <code>-mount / &quot;G:\My Drive\picotron\drive&quot;</code> and that would work just as well.</p> https://www.lexaloffle.com/bbs/?tid=141466 https://www.lexaloffle.com/bbs/?tid=141466 Fri, 05 Apr 2024 16:21:34 UTC Checking web player timings, please ignore <p> <table><tr><td> <a href="/bbs/?pid=143901#p"> <img src="/bbs/thumbs/pico64_time_check-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=143901#p"> time_check</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=143901#p"> [Click to Play]</a> </td></tr></table> </p> <p>Just checking web player timings. Please ignore.</p> <p>(Just to note, this uses really crappy math for getting the seconds, so if it overlaps the current minute's seconds, the numbers will be overlap incorrectly. Just start it again near the beginning of a minute.)</p> <p>But <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>, check these timings. The web player is running super fast.</p> https://www.lexaloffle.com/bbs/?tid=140922 https://www.lexaloffle.com/bbs/?tid=140922 Tue, 19 Mar 2024 21:41:40 UTC HexPop Wallpaper <p> <table><tr><td> <a href="/bbs/?pid=143893#p"> <img src="/bbs/thumbs/pico64_hexpop-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=143893#p"> HexPop Wallpaper</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=143893#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is a fun, simple wallpaper. I was trying to keep it from being too annoying, but also still look cool. At some point I may have it follow the current theme colors. But for now it just uses the spritesheet. It runs idle at around 0.3% CPU and maxes out around 4% or 5% CPU.</p> <p>You can add this to your Picotron wallpapers by typing this in Terminal (which assumes you've already created a <code>/appdata/system/wallpapers</code> folder):</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>load #hexpop save /appdata/system/wallpapers/hexpop.p64.png</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>If you want them, I also made three other variations: Fire, Rainbow, and one that follows your theme.</p> <p> <table><tr><td> <a href="/bbs/?pid=143893#p"> <img src="/bbs/thumbs/pico64_hexpop_fire-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=143893#p"> HexPop Fire Wallpaper</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=143893#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=143893#p"> <img src="/bbs/thumbs/pico64_hexpop_rainbow-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=143893#p"> HexPop Rainbow Wallpaper</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=143893#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=143893#p"> <img src="/bbs/thumbs/pico64_hexpop_theme-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=143893#p"> HexPop Theme Wallaper</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=143893#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=140920 https://www.lexaloffle.com/bbs/?tid=140920 Tue, 19 Mar 2024 20:37:04 UTC Sprite flags don't reset when using clipboard <p>When using Ctrl-X to cut and paste sprites, the sprite flags remain in the old sprite location. Maybe this is intentional? But it seems like maybe the sprite flags should reset back to a brand new, untouched sprite state when sprites are cut and then pasted elsewhere. Here's a GIF showing the behavior:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/untitled_8_0.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=47701 https://www.lexaloffle.com/bbs/?tid=47701 Fri, 06 May 2022 20:49:44 UTC Cursor() gets weeeeirrd if the Y value gets too high <p>If you keep increasing the Y value of the cursor, things get weeeeiiird. First, the CPU usage goes out the roof. Second, there's a weird area in the corner that obscures the text. Here's a bit of code that will reproduce the problem:</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 _init() y=110 f=0 end function _draw() cls(1) f+=1 if (f%20==0) y+=1 cursor(0,y) print(&quot;hai&quot;) print(&quot;cursor_x:&quot;..peek(0x5f26)..&quot;\ncursor_y:&quot;..peek(0x5f27)..&quot;\ny:&quot;..y..&quot;\ncpu:&quot;..stat(1),0,0,7) 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>And this is what happens:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/untitled_3_1.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=42313 https://www.lexaloffle.com/bbs/?tid=42313 Mon, 05 Apr 2021 10:00:03 UTC Simple FPS Controller <p> <table><tr><td> <a href="/bbs/?pid=88033#p"> <img src="/bbs/thumbs/pico8_mb_simplefps-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=88033#p"> Simple FPS Controller</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=88033#p"> [Click to Play]</a> </td></tr></table> </p> <p>I made a <em>very</em> simple FPS controller as a sort of example cart to build off of. This is just to get you going, as opposed to a full framework around which to build a full game. Hopefully it serves as a good jumping off point for someone to make something fun.</p> <p>It uses player 2's ESDF controls for moving around and SPACE for jumping.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/fps_0.gif" alt="" /> <p><strong>EDIT:</strong> Here's a <em>very</em> heavily commented version! Probably <em>way</em> more comments than usually necessary, but it's intended to help you learn, rather than just briefly annotate what's happening in the code.<br /> <table><tr><td> <a href="/bbs/?pid=88033#p"> <img src="/bbs/thumbs/pico8_mb_simplefpscomments-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=88033#p"> Simple FPS Controller - +Comments! -Glyphs!</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=88033#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=41721 https://www.lexaloffle.com/bbs/?tid=41721 Tue, 23 Feb 2021 00:50:27 UTC Dig Deeper - Global Game Jam '21 <p> <table><tr><td> <a href="/bbs/?pid=87544#p"> <img src="/bbs/thumbs/pico8_mb_digdeeper-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=87544#p"> Dig Deeper</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=87544#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Dig Deeper</h1> <p>This was made for Global Game Jam 2021 with <a href="https://www.pigsquad.com">PIGSquad</a>. The theme was Lost &amp; Found.</p> <h2>Controls</h2> <p>⬅️➡️⬆️⬇️ - Movement<br /> 🅾️/❎ - Interact (Z/X or X/C on keyboard!)<br /> ⬅️➡️⬇️+❎ - Dig<br /> ⬆️ - Jump/Jets</p> <h2>Credits</h2> <p>Everything But Music - <a href="https://www.lexaloffle.com/bbs/?uid=10198"> @MBoffin</a><br /> Music - <a href="https://www.lexaloffle.com/bbs/?uid=11292"> @Gruber</a> (from <a href="https://www.lexaloffle.com/bbs/?pid=38442">PICO-8 Tunes Volume 1</a>)</p> <p><strong>Edit:</strong> Forgot to mention, but there is a speedrun mode you can enable/disable from the menu.</p> <p><strong>Edit 2:</strong> Fixed a couple visual errors and balance tweaks. Also made the speedrun mode skip the intro cutscene, and also shows your final time on the very end message screen (after the final cutscene).</p> https://www.lexaloffle.com/bbs/?tid=41526 https://www.lexaloffle.com/bbs/?tid=41526 Fri, 12 Feb 2021 19:50:01 UTC Infinipig: Swine and Coswine <p> <table><tr><td> <a href="/bbs/?pid=86559#p"> <img src="/bbs/thumbs/pico8_infinipig-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86559#p"> Infinipig: Swine and Coswine</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=86559#p"> [Click to Play]</a> </td></tr></table> </p> <p><em>You are the ghost of Cubepig, looking for a body! Can you find one on your own, or will you have to trade something... precious...</em></p> <p>This game was made in 3 hours by the <a href="https://twitch.tv/PIGSquad">PIGSquad Twitch Chat</a> during a mini-jam on January 17, 2021.</p> https://www.lexaloffle.com/bbs/?tid=41198 https://www.lexaloffle.com/bbs/?tid=41198 Mon, 18 Jan 2021 16:52:15 UTC Feature Request: Copying Error Messages <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>:</p> <p>I teach a LOT of students PICO-8 and lately I've been mostly teaching online classes over Zoom. I'm usually doing this webinar style where I am the presenter and the students are participants. I can't see their screen, but they can see mine and there's a Q&amp;A chat window where they can ask questions and so forth.</p> <p>It would be <em><strong>extremely</strong></em> helpful to be able to copy console error messages to the clipboard. Currently you can hit CTRL-C in the console to copy what's typed into the command prompt, but it would be even more useful, if the prompt was empty, to use CTRL-C to copy the last error generated. Like this:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/PICO-8_0.gif" alt="" /> <p>This would make it <em><strong>so much easier</strong></em> to help students when they run into errors, especially the very young students. If they get an error, they can just hit CTRL-C and paste the error into the Zoom chat. This would also be helpful for people trying to get other live help online, such as from Discord.</p> https://www.lexaloffle.com/bbs/?tid=40385 https://www.lexaloffle.com/bbs/?tid=40385 Fri, 13 Nov 2020 23:11:49 UTC Top-Down Adventure - Voxatron Edition <p> <table><tr><td> <a href="/bbs/?pid=80433#p"> <img src="/bbs/thumbs/vox_mb_topdown_vox-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=80433#p"> Top-Down Adventure - Voxatron Edition</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=80433#p"> [Click to Play]</a> </td></tr></table> </p> <p>I had a lot of fun making this. This is the <a href="https://www.youtube.com/playlist?list=PLdLmU93eWisKpyk1WZywUSYAq5dkCPFIv">top-down adventure game tutorial</a> I made for PICO-8, but re-written to work in Voxatron.</p> <p>I had to make a few changes to how things worked, since it's in 3D, of course, and there are things that Voxatron doesn't have, like a map editor or its associated functions like <strong>mget()</strong> or <strong>mset()</strong>, or other functions like <strong>btnp()</strong> and so forth. But other than those few changes, it's basically the same code as from the tutorial.</p> <p>Feel free to take it and make your own games with it. :)</p> https://www.lexaloffle.com/bbs/?tid=39130 https://www.lexaloffle.com/bbs/?tid=39130 Thu, 06 Aug 2020 22:05:05 UTC Coroutine Question - Why do these work differently? <p>I'm sure this is probably an easy answer, but why do these work differently, where <strong>co_anim1</strong> resets to <strong>nil</strong> after completion, but <strong>co_anim2</strong> does not?</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 _init() co_anim1=cocreate(animate) co_anim2=cocreate(animate) end function _draw() cls() --first method if (co_anim1 and costatus(co_anim1)!=&quot;dead&quot;) then coresume(co_anim1) else co_anim1=nil end --second method, same as first, --but sent to a function to do --the work. resume(co_anim2) print(&quot;co_anim1:&quot;,0,0,5) print(co_anim1,36,0,7) if (co_anim1) print(costatus(co_anim1),75,0,7) print(&quot;co_anim2:&quot;,0,6,5) print(co_anim2,36,6,7) if (co_anim1) print(costatus(co_anim1),75,6,7) end function resume(co) if (co and costatus(co)!=&quot;dead&quot;) then coresume(co) else co=nil end end function animate() local a=rnd() for i=1,40 do circ(64+cos(a)*i,64+sin(a)*i,4,7) yield() 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>This code results in this behavior:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10198/coresume.p8_1.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=38122 https://www.lexaloffle.com/bbs/?tid=38122 Mon, 25 May 2020 16:54:43 UTC Syncing PICO-8 installs with Dropbox <p>I use Dropbox to share my PICO-8 carts, screenshots, and gifs between my desktops and laptop. It's extremely useful to use it that way. It means all my carts in are one place, they're all saved to the cloud, and I never have to worry about which carts are on which device. (Another bonus is that I only have to update PICO-8 in one place, Dropbox, when a new version comes out.)</p> <p><strong>The TL;DR is just installing PICO-8 in a folder in Dropbox, and then tweaking the config file on each device to make sure it uses the Dropbox folder as where stores the carts and images (screenshots and gifs).</strong></p> <p>I know there are probably tweaks that could be done to this guide for each person's individual setup, and maybe there are ways to improve what I have set up here, but this has worked for me for half a decade, so.... &macr;\_(ツ)_/&macr; Also, I primarily use Windows machines, so this setup may need tweaking to make this kind of setup work on MacOS or Linux. (It should be effectively the same process, though.)</p> <p>Here are the steps I use:</p> <p>1) I install PICO-8 into a folder on Dropbox. I'll call that folder <strong>D:\Dropbox\pico8</strong> for simplicity. (My actual path to PICO-8 in Dropbox is way longer, has spaces, etc.)</p> <p>2) I run PICO-8 from that folder so that it creates the appropriate files and folders in my <strong>AppData</strong> folder at <strong>C:\Users\Dylan\AppData\Roaming\pico-8</strong></p> <p>3) I create a <strong>carts</strong> and <strong>images</strong> folder in <strong>D:\Dropbox\pico8</strong></p> <p>4) I create a symbolic link folder for both carts and images in the root of my <strong>C:\</strong> drive by opening up a Command Prompt window and typing the following:</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>cd c:\ mklink /d pico8-carts d:\dropbox\pico8\carts mklink /d pico8-images d:\dropbox\pico8\images</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 step requires some explanation, and this step <em>might</em> not be necessary for you, but I do it because my full Dropbox folder path has spaces in it and that seems to not work with PICO-8's config file settings.</p> <p>A symbolic link is a like a fake folder that points to a real folder. So I'm effectively making a fake <strong>c:\pico8-carts</strong> folder that, when you open it, actually goes to <strong>D:\Dropbox\pico8\carts</strong> instead.</p> <p>5) Now I edit my PICO-8 <strong>config.txt</strong> file to use these new folders. Specifically, I ensure that these settings are set in the <strong>config.txt</strong> file:</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>// Location of pico-8's root folder root_path c:\pico8-carts // Desktop for saving screenshots etc. Defaults to $HOME/Desktop desktop_path c:\pico8-images\</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>If the settings aren't already in your <strong>config.txt</strong> file, go ahead and add them. (The lines that start with <strong>//</strong> are just comments and can be ignored if they aren't there or are different.)</p> <p>This makes sure that PICO-8 is looking at the &quot;fake&quot; folders created with <strong>mklink</strong> above for saving carts and screenshots/gifs. While PICO-8 thinks they are being saved to <strong>c:\pico8-carts</strong> and <strong>c:\pico8-images</strong>, they are actually being saved into my Dropbox folder.</p> <p>I then do steps 2-5 on each device. Now, when I save or load a cart, or I save a screenshot or gif, it goes to Dropbox instead and everything stays in sync.</p> <p>I'm happy to answer questions on this process, and if you have suggestions for improving it or changing it, feel free to comment below. Like I said above, there are probably many ways of simplifying this process or making it cleaner (like using command line arguments instead of changing the config.txt, for example) but this works for me and I thought others might benefit from its use.</p> https://www.lexaloffle.com/bbs/?tid=38082 https://www.lexaloffle.com/bbs/?tid=38082 Fri, 22 May 2020 19:15:07 UTC Snowfight - PICO-8 Advent Calendar 2019 Day 4 <p> <table><tr><td> <a href="/bbs/?pid=70560#p"> <img src="/bbs/thumbs/pico8_mb_advent2019-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=70560#p"> Snowfight</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=70560#p"> [Click to Play]</a> </td></tr></table> </p> <p>Remember the classic Shockwave Flash snowball fight game called Snowcraft from 1998? 21 years ago! My entry for this year's <a href="https://www.lexaloffle.com/bbs/?tid=36076">PICO-8 Advent Calendar</a> is a demake of that beloved Flash game. <em>Huge</em> thanks to <a href="https://www.lexaloffle.com/bbs/?uid=11292"> @Gruber</a> for helping with the sound effects!</p> <p>This game uses the mouse. (Sorry, mobile users!)</p> <p>I tried to make this as close to the original as possible. Have fun! :)</p> https://www.lexaloffle.com/bbs/?tid=36107 https://www.lexaloffle.com/bbs/?tid=36107 Wed, 04 Dec 2019 07:32:08 UTC Simple 3D Boids v1.0 <p> <table><tr><td> <a href="/bbs/?pid=69784#p"> <img src="/bbs/thumbs/vox_mb_3dboids-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=69784#p"> Simple 3D Boids v.10</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=69784#p"> [Click to Play]</a> </td></tr></table> </p> <p>❎ to show CPU usage (but I don't think it's accurate?)<br /> 🅾️ to show the follow target</p> <p>This is a quick port of <a href="https://www.lexaloffle.com/bbs/?tid=35879">my PICO-8 boids cart</a>. Nothing fancy, just some boids doing their thing.</p> https://www.lexaloffle.com/bbs/?tid=35884 https://www.lexaloffle.com/bbs/?tid=35884 Sun, 10 Nov 2019 20:30:18 UTC Simple Boids v1.0 <p> <table><tr><td> <a href="/bbs/?pid=69779#p"> <img src="/bbs/thumbs/pico8_mb_boids-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=69779#p"> Simple Boids v1.0</a><br><br> by <a href="/bbs/?uid=10198"> MBoffin</a> <br><br><br> <a href="/bbs/?pid=69779#p"> [Click to Play]</a> </td></tr></table> </p> <p>❎ to show the follow target<br /> 🅾️ to show CPU usage</p> <p>I've been wanting to do this for a while. This is a simple <a href="http://www.red3d.com/cwr/boids/">boids</a> simulation. Most of the code was adapted from <a href="https://processing.org/examples/flocking.html">Daniel Shiffman's implementation</a> in Processing.</p> <p>Feel free to pick apart the code. Unfortunately, it's not commented much, and I'm absolutely sure there are optimizations that can be done.</p> https://www.lexaloffle.com/bbs/?tid=35879 https://www.lexaloffle.com/bbs/?tid=35879 Sun, 10 Nov 2019 09:13:19 UTC