ChristopherD [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=31158 Pirouette <img style="margin-bottom:16px" border=0 src="/media/31158/pirouette_lexaloffle_title_card_1.png" alt="" /> <h1>Introducing <em>Pirouette</em></h1> <p>Pirouette is an animated, explorable, generative art toy. So named for the dancing, twirling shapes the algorithm generates, I was inspired to make this after seeing a RISC assembly version that debuted recently.<br /> <a href="https://youtu.be/VxGOBxy6oAY?feature=shared">https://youtu.be/VxGOBxy6oAY?feature=shared</a></p> <p>A note from the creator of that implementation pointed me to a message board with a version running in Sinclair BASIC, whose author says he's not sure where he obtained the original algorithm. My hunt continues. Other ports to BBC BASIC, Owlet, and Processing (Java edition) are available at the board posting.<br /> <a href="https://stardot.org.uk/forums/viewtopic.php?f=54&amp;t=25833">https://stardot.org.uk/forums/viewtopic.php?f=54&amp;t=25833</a></p> <h2>The port</h2> <p>This Pico-8 implementation tries its best to present the beauty of the 20-line (!) original within the 16-color limits of our beloved fantasy console. I tried to match a 15-color (need black for background) palette from Pico-8's 32-color extended colors to the original 32-bit color gamut and was happy (and a little surprised) to see expected shapes and swirls emerging from the void.<br /> <em>(that said, I think there is room for further palette tweaking)</em></p> <h2>Beyond the port</h2> <p>This implementation introduces controls for exploring the universe.</p> <ul> <li>Arrow keys will reposition the camera (do think of it as moving a camera, not moving the universe)</li> <li>Hold X button (keyboard &quot;X&quot;) to control space and time.</li> <li>Hold O button (keyboard &quot;Z&quot;) to control universe complexity and shift quantum phase.</li> <li>X and O simultaneously to freeze/thaw the quantum state.</li> <li>Open the pause menu to reset the known universe.</li> </ul> <h2>Enjoy your explorations</h2> <p> <table><tr><td> <a href="/bbs/?pid=135646#p"> <img src="/bbs/thumbs/pico8_pirouette-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=135646#p"> Pirouette 1.0</a><br><br> by <a href="/bbs/?uid=31158"> ChristopherD</a> <br><br><br> <a href="/bbs/?pid=135646#p"> [Click to Play]</a> </td></tr></table> </p> <h3>Note: high universe complexity consumes significant CPU (displayed in the upper left of the UI)</h3> https://www.lexaloffle.com/bbs/?tid=54517 https://www.lexaloffle.com/bbs/?tid=54517 Tue, 10 Oct 2023 23:36:51 UTC One Bit Wonder: back-to-basics image compression <p> <table><tr><td> <a href="/bbs/?pid=131252#p"> <img src="/bbs/thumbs/pico8_one_bit_wonder-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=131252#p"> One Bit Wonder 1.0</a><br><br> by <a href="/bbs/?uid=31158"> ChristopherD</a> <br><br><br> <a href="/bbs/?pid=131252#p"> [Click to Play]</a> </td></tr></table> <br /> <em>Because this needs drag-and-drop, the above web-embed is <strong>only</strong> to make the cart easy to download.<br /> Source code available at GitHub: <a href="https://github.com/ChristopherDrum/1bitwonder">https://github.com/ChristopherDrum/1bitwonder</a></em></p> <h2>What is it?</h2> <p>This cart takes 4 1-bit images and combines them into a single image, where each &quot;layer&quot; of the image is encoded by its pixel color. Set your <code>pal()</code> to the image you want, then <code>spr()</code> as normal; that's it. Bit-planes made simple.</p> <p>I've seen any number of 1-bit graphics games lately (especially with the Porklike sub-genre) and this could possibly quadruple the available space for sprites in games like that. Expand the environment and enemy types, maybe?</p> <h2>In action</h2> <p>Here's four pieces of classic MacPaint artwork being extracted one-by-one via <code>pal()</code> calls, plus the composite from which the images are being pulled. Here's the composite to make it more clear what this program generates.</p> <p><img style="margin-bottom:16px" border=0 src="/media/31158/1_bit_wonder_0.gif" alt="" /> <img style="margin-bottom:16px" border=0 src="/media/31158/45_wonder_example.png" alt="" /><br /> <em>(original artwork by Susan Kare, Bert Monroy, Martin Melin, and Brian Thomas)</em></p> <p><img style="margin-bottom:16px" border=0 src="/media/31158/47_monks3_cropped.png" alt="" /> --&gt; <img style="margin-bottom:16px" border=0 src="/media/31158/monks_quarter_size.png" alt="" /><br /> Alternately you could cut a full-screen (or whatever size) image into slices and put those slices into 1/4 the data space. (this is what I did for Mystery House)</p> <h2>Usage</h2> <p>Upon launch, One Bit Wonder is ready to receive images. Drag in up to four (4) 128x128 pixel 1-bit images. They will be automatically added to a compressed image and previewed for you, using the same <code>pal()</code> method of image extraction you would use in your own code. After you've added your images...</p> <ul> <li>Save out the palette code (which really doesn't change much, your artwork depending)</li> <li>Export the spritesheet</li> </ul> <h3>Controls</h3> <ul> <li><code>Left/right arrows</code> : cycle through the loaded images, including the full composite.</li> <li><code>z</code> : Save out a .txt file that includes the palettes and transparency palettes for your images.</li> <li><code>x</code> : Clear out everything and start a new composite (don't forget to export your composite spritesheet first!)</li> </ul> <p>The composite is <code>cstore()</code> to the cart. Exit the program and run <code>export your_filename.png</code> as usual to export the spritesheet. You could also, of course, copy/paste from this cart's spritesheet into your target cart.</p> <h3>Note</h3> <ul> <li>Images <em>must</em> be black background with one-color artwork.</li> <li>Images <em>must</em> be 128x128 (but you don't have to USE the whole space; I only used the upper 1/4 for Mystery House).</li> <li>The palettes generated will respect the original color of the line-art.</li> <li>Remember, the palettes generated are just a baseline; replace the values with other colors as needed.</li> <li>You don't have to use the transparency palettes. Draw a full-screen image in any two colors, for example.</li> <li>The example shows four full-screen images, but you could split an image into four parts and stack those into the storage space of just one of those. Slice and dice as needed.</li> </ul> <h2>Background</h2> <p>While working on <a href="https://www.lexaloffle.com/bbs/?tid=53346">Mystery House (Remodeled)</a>, I needed image compression to fit everything into 64K. Most of the problem was solved with a custom illustration program I wrote called <a href="https://www.lexaloffle.com/bbs/?tid=53461">Versawriter-8</a>.</p> <p>However, there was still the matter of some sprites (game logos, etc) and detailed objects that weren't a great fit for Versawriter-8's vector-based drawing. For those elements I used the spritesheet, but I didn't have the luxury of using the entire spritesheet ROM area. At most, I could only use 1/4 of it, from address 0x0000 to 0x0800.</p> <p>Looking into Pico-8 discussions on image compression I saw a lot of talk about RLE and LZW compression, trying to minimize the token count of a decoder. I wanted a &quot;back to basics&quot; solution, so this gave me the opportunity to build something I'd been toying around with in my head for a while with an almost-free decompression method.</p> <h2>Last thoughts</h2> <p>Pico-8 color is 4-bit, so here I've compressed one image per bit. But we <em>could</em> do different combinations. Two, 2-bit images, or a 3-bit image and 1-bit image, or a 2-bit plus two 1-bit. I might spend some time making this little tool a bit more robust to a variety of source images and image sizes.</p> <p>Personally I made an <code>lspr()</code> function which accepts normal <code>sspr()</code> parameters plus the &quot;layer&quot; number for the sprite, which does the <code>pal()</code> setup for the request.</p> https://www.lexaloffle.com/bbs/?tid=53207 https://www.lexaloffle.com/bbs/?tid=53207 Sat, 22 Jul 2023 02:47:59 UTC Versawriter-8: a simple vector drawing program <p> <table><tr><td> <a href="/bbs/?pid=132123#p"> <img src="/bbs/thumbs/pico8_versawriter8-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=132123#p"> versawriter8</a><br><br> by <a href="/bbs/?uid=31158"> ChristopherD</a> <br><br><br> <a href="/bbs/?pid=132123#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>NOTE:</strong> <em>This is a desktop app. The tools that make it interesting and its user interface (mouse/keyboard) make a web version not so useful. I've embedded it here in the spirit of general availability to Pico-8 users via splore.</em></p> <h1>Versawriter-8</h1> <p>Recently I released <a href="https://www.lexaloffle.com/bbs/?tid=53346">Mystery House (Remodeled)</a>, a ground-up rebuild of the first graphic adventure game. As part of the creation process, I wanted to redo the graphics using a workflow similar to the one that Roberta Williams did back in the day. Versawriter-8 was built so I could build Mystery House.</p> <p>Everything in Mystery House (Remodeled) was drawn in Pico-8 using this tool. There are 45 unique &quot;full screen&quot; images, plus a couple of dozen objects, stored in about 10K using this tool and compression method.</p> <h2>What is (was) a Versawriter?</h2> <p>Roberta and Ken Williams used a device called a Versawriter on the Apple 2 to trace hand-drawn illustrations into Apple 2 hi-res graphics format. Ken wrote custom software for it that would &quot;record&quot; Roberta's tracing, then that was stored in a vector graphics compressed format. In this compressed format, only each point is recorded, and a line is drawn to connect it to the previous point. At run-time the computer would &quot;play back&quot; the recording and redraw the image. This allowed the limited storage of the floppy disk to hold all of the images needed for the game. This process would go on, conceptually, to become the AGI graphics format of the old Sierra games (i.e. don't store bitmaps, store instructions for drawing)</p> <img style="margin-bottom:16px" border=0 src="/media/31158/versawriter_ad.jpg" alt="" /> <h2>How to Use Versawriter-8</h2> <p>Versawriter-8 is quite simple in its scope and usage. You start in Draw mode.</p> <h3>In Draw mode</h3> <ul> <li>Left-click to add points. Each consecutive click adds a point to the &quot;island&quot; (a series of continguous points)</li> <li>Right-click to end drawing the current &quot;island&quot;</li> <li>Left-click anywhere to start adding a new &quot;island&quot; to the drawing</li> <li>Drag a .png file (up to 128x88) into the draw area to use as a tracing template (you have control over positioning, draw color contrast, and more)</li> </ul> <p><code>Space</code> switches to Edit Mode where you can fine tune your drawing a bit, and maybe save some bytes.</p> <h3>In Edit Mode</h3> <ul> <li>Left-click-and-hold on a point to drag it around to a new position. </li> <li>Left-click-and-hold on a line to drag that &quot;island&quot; to a new position (only contiguous points).</li> <li>Right-click on a point to delete it</li> <li>Right-click on an &quot;island&quot; to delete it.</li> </ul> <p>When you're done, <code>C</code> key will copy the current image in its compressed string format to the clipboard.<br /> A string copied to the clipboard can also be pasted in. Remember, Pico-8 needs permission to read the clipboard first, so CTRL-V to grant access, then <code>V</code> to paste it in.</p> <h3>The format of a compressed string</h3> <p>Every point is stored as an x,y pair, with no delimiter between them (because they MUST be in pairs). We add 93 to X and Y (to shift their chr() values outside any P8SCII special characters) and that chr() is encoded in the string. Every &quot;island&quot; (a continguous series of connected points) is separated by chr(255).</p> <p>Because image compression is the raison d'etre of this program, the total bytes/points/island count are always shown in the user interface. The byte count can be controlled by: fewer points, fewer islands. Try to think about how to draw efficiently. With practice you'll see how you can remove points without affecting the image quality, thanks to the low resolution of the screen.</p> <h3>To draw a compressed string</h3> <p>Feed the generated string to a routine like the one below to draw it (flip() if necessary). This one is 77 tokens. If you don't need offset or arbitrary color, it goes down to 53 tokens.</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 draw_image(pic_str, offset, c) local offset = offset or {0,0} local c = c or 7 local islands = split(pic_str, chr(255)) for i in all(islands) do line() for p = 1, #i, 2 do local x, y = ord(i[p])-93, ord(i[p+1])-93 x += offset[1] y += offset[2] line(x,y,c) end line() 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> <h2>The User Interface</h2> <img style="margin-bottom:16px" border=0 src="/media/31158/interface_explanation_1.png" alt="" /> <h2>Complete Tool List</h2> <ul> <li>Drag-and-drop .png file (128x88 max) to use as a tracing template</li> <li><code>space</code> : toggle between Draw mode and Edit mode</li> <li><code>n</code> : clear the current document and start a new one</li> <li><code>x</code> : clear the tracing template</li> <li><code>c</code> : copy image string to clipboard</li> <li><code>v</code> : paste clipboard string into canvas (Pico-8 requires CTRL-V first)</li> <li><code>p</code> : toggle point display on/off</li> <li><code>l</code> : toggle line display on/off</li> <li><code>t</code> : toggle template display on/off</li> <li><code>r</code> : toggle template &quot;tracing mode&quot; (monochromatic)</li> <li><code>-</code> : cycle through point color (for UI only)</li> <li><code>=</code> : cycle through line color (for UI only)</li> <li><code>s</code> : save your work to local cart (bottom-right light goes GREEN)</li> <li><code>a</code> : restore your saved work from local cart</li> <li><code>arrow keys</code> : nudge template position (in Draw mode); nudge all points (in Edit mode)</li> </ul> <h1>Self Assessment</h1> <h2>Current Limitations</h2> <p>As the current version was built for my specific needs on a specific project, the main limitation of the program is in the draw area you can work in. It is specifically tailored to build Apple 2 hi-res graphics proportions, meaning a maximum draw area of 128x88, which leaves room for 6 lines of text below it; seemed reasonable at the time.</p> <p>Additionally you cannot encode any color into the drawing. It is one-color only, but in your personal draw routine you could assign colors to drawings or even points within the drawing. You could draw multiple images on top of each other in different colors, to work around this limitation if you wanted.</p> <h2>Next Steps</h2> <p>I can think of four primary features that would make this more generally useful</p> <ul> <li>Set pen color for lines</li> <li>Allow flood fill</li> <li>Full screen image editing</li> <li>Better Edit mode (append points to existing island? group islands?)</li> </ul> <h2>Source code on GitHub</h2> <p><a href="https://github.com/ChristopherDrum/versawriter8">https://github.com/ChristopherDrum/versawriter8</a></p> https://www.lexaloffle.com/bbs/?tid=53461 https://www.lexaloffle.com/bbs/?tid=53461 Wed, 19 Jul 2023 06:46:46 UTC Mystery House (Remodeled) <p> <table><tr><td> <a href="/bbs/?pid=131742#p"> <img src="/bbs/thumbs/pico8_mysteryhouse-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=131742#p"> Mystery House (Remodeled) 1.0.1</a><br><br> by <a href="/bbs/?uid=31158"> ChristopherD</a> <br><br><br> <a href="/bbs/?pid=131742#p"> [Click to Play]</a> </td></tr></table> </p> <p>The &quot;first graphic adventure&quot; (according to itself), and the title that launched the game development careers of Roberta and Ken Williams (and launched Sierra On-Line), is now available on the Pico-8. Do <strong>YOU</strong> have what it takes to become &quot;a guru wizard?&quot;</p> <p>All text, graphics, <strong><em>and bugs</em></strong> of the game that launched the game development careers of Ken and Roberta Williams have been lovingly ported to your favorite virtual console. Yes, the entire 140K original has been crunched down to a single 60K cart, including save state, with all new hand-drawn images (see &quot;Tools Used&quot; below). The construction of the game is essentially broken down into engine and data, meaning it could be modified or remixed or rebuilt into a new game (detailed blog posts are in the works).</p> <p>**NOTE: this is a text adventure, and so it requires a keyboard. Not a mobile-friendly game, I'm sorry to say.</p> <p>**UPDATE: added a link to an in-depth analysis of the mechanisms that drove the original game</p> <h2>Screenshots</h2> <p><img style="margin-bottom:16px" border=0 src="/media/31158/mh_1.png" alt="" /> <img style="margin-bottom:16px" border=0 src="/media/31158/PICO-8_2.png" alt="" /></p> <h2>Tools Used</h2> <p>This conversion of the public domain classic was made possible by three factors:</p> <ol> <li>The analysis and data dump provided by <a href="http://dx.doi.org/10.1558/jca.36745">Inspecting the Foundation of Mystery House</a> by J. Aycock and K. Biittner for the <em>Journal of Contemporary Archaeology</em>, 2019</li> <li>The creation of a companion art program built just to make this game, Versawriter-8. This allows the game to hold graphics data in a &quot;vector&quot; format similar to the original, and provides tracing tools which mimic the workflow of the original creators with a <a href="https://steemit.com/retrocomputing/@darth-azrael/versawriter-apple-ii">Versawriter on the Apple 2</a>.</li> <li>The creation of another companion program, 1 Bit Wonder, which leverages a simple approach to image compression with 0-token (?) decompression.*</li> </ol> <p>Further details on <em>Versawriter-8</em> and <em>1 Bit Wonder</em> will be posted in the coming days.<br /> For now, here's a screenshot of each in action.</p> <p><img style="margin-bottom:16px" border=0 src="/media/31158/versawriter8_0.png" alt="" /> <img style="margin-bottom:16px" border=0 src="/media/31158/1_bit_wonder_0.png" alt="" /></p> <h2>Want to Know More?</h2> <p>Uncompressed data, un-minified source code, notes, and more are at<br /> <a href="https://github.com/ChristopherDrum/mystery_house_remodeled/">https://github.com/ChristopherDrum/mystery_house_remodeled/</a></p> <p>The custom drawing program, Versawriter-8, used to do the graphics is available now<br /> <a href="https://www.lexaloffle.com/bbs/?tid=53461">https://www.lexaloffle.com/bbs/?tid=53461</a></p> <p>The custom sprite compressor, One Bit Wonder, is available now<br /> <a href="https://www.lexaloffle.com/bbs/?tid=53207">https://www.lexaloffle.com/bbs/?tid=53207</a></p> <p>An itch.io page is also available at<br /> <a href="https://christopherdrum.itch.io/mystery-house">https://christopherdrum.itch.io/mystery-house</a></p> <h2>Want to Know WAY TOO MUCH More?</h2> <p>Here's a very lengthy blog post about how the original game worked, as discovered while porting the game. This presents a kind of &quot;software archaeology&quot; analysis of the game. There's not too much specific to the Pico-8 except to discuss some of the ways that &quot;classic bugs&quot; were translated to the Pico-8 environment.<br /> <a href="https://christopherdrum.itch.io/mystery-house/devlog/545148/mystery-house-excavated">https://christopherdrum.itch.io/mystery-house/devlog/545148/mystery-house-excavated</a></p> <p>*if PAL and SSPR draw calls are already part of your graphics routine, it may actually be zero additional tokens.</p> https://www.lexaloffle.com/bbs/?tid=53346 https://www.lexaloffle.com/bbs/?tid=53346 Thu, 13 Jul 2023 00:35:16 UTC List .png files in LS and DIR <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a><br /> As .png files are a supported graphic format with the IMPORT and EXPORT commands, I think it makes sense to list .png image files in the working directory when using the LS and DIR commands. I'm working on a graphic utility tool and it's a bit of a drag to not be able to list the very same images that I'm allowed to import and export by name.</p> https://www.lexaloffle.com/bbs/?tid=52781 https://www.lexaloffle.com/bbs/?tid=52781 Thu, 18 May 2023 06:34:14 UTC uConsole: New Handheld Dev Box from Clockwork <img style="margin-bottom:16px" border=0 src="/media/31158/Screenshot 2022-10-26 103701.png" alt="" /> <p>Their DevTerm got middling reviews, if I recall correctly. This one has an all-metal body and maybe will fulfill the promises that the PocketCHIP couldn't keep? Pico-8 (and fantasy consoles in general) is explicitly noted as one of the use cases.</p> <img style="margin-bottom:16px" border=0 src="/media/31158/Screenshot 2022-10-26 104010.png" alt="" /> <p>At any rate, I know there's a subsection of Pico-8 users looking for &quot;the perfect portable device.&quot; I'll be curious to see reviews on this.</p> <p><a href="https://www.clockworkpi.com/uconsole">https://www.clockworkpi.com/uconsole</a></p> https://www.lexaloffle.com/bbs/?tid=49919 https://www.lexaloffle.com/bbs/?tid=49919 Wed, 26 Oct 2022 01:35:06 UTC Exported binary apps trigger virus/security alerts <p>I've asked this question before, but it was lumped in with other export-related stuff; so I'm breaking this out into a standalone post. macOS and Windows exported binary applications trigger security/virus warnings that scare off potential users of my software. As recommended by Pico-8 docs I am &quot;distribut(ing) the outputted zip files as-is to ensure users on other operating systems can run them.&quot;</p> <p><strong>On Windows:</strong><br /> The executable on first launch triggers Windows Defender on Windows 7 and 10 (reported so far). I tried codesigning the .exe with signtool to no avail. Is there a way to fix this?</p> <p><strong>On macOS:</strong><br /> Like Windows, the unsigned app triggers a security warning. Has anyone successfully fixed this, perhaps with an Apple developer account and re-codesigning?</p> <p>I don't mind signing up and paying for Microsoft and Apple developer accounts if it will resolve the problem, but I don't want to pay just to find out it doesn't help. Hoping the community has experience I can leverage before making any financial commitments. </p> https://www.lexaloffle.com/bbs/?tid=47193 https://www.lexaloffle.com/bbs/?tid=47193 Sat, 02 Apr 2022 00:13:43 UTC (half-solved) \# control code clips custom font by 1px <p>Here's an example of trying to add a continuous underscore to the #font_snippet alternate font. Printing works fine with <code>\014\f7</code> but the font gets clipped by 1px on the right with <code>\014\#1\f7</code><br /> (color is irrelevant; the inclusion of <code>\#(number)</code> triggers it.</p> <img style="margin-bottom:16px" border=0 src="/media/31158/clipped_font_example.png" alt="" /> <p>EDIT: see below for the fix.</p> https://www.lexaloffle.com/bbs/?tid=46717 https://www.lexaloffle.com/bbs/?tid=46717 Wed, 23 Feb 2022 04:14:37 UTC print returns [nil] with \^d <p>According to documentation<br /> <code>PRINT returns the right-most x position that occurred while printing</code></p> <p>One can make a valid case that certain print control codes may result in unusual return values, but this one doesn't feel right to me.</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>x = print('\^iabcde') print(x) y = print('\^d2abcde') print(y)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>results in</p> <img style="margin-bottom:16px" border=0 src="/media/31158/Screenshot 2022-02-05 173710.png" alt="" /> <p>The <em>speed</em> of the print output shouldn't affect our ability to receive the final x position, IMHO.</p> https://www.lexaloffle.com/bbs/?tid=46455 https://www.lexaloffle.com/bbs/?tid=46455 Sat, 05 Feb 2022 08:36:28 UTC &gt; Status Line v2.0: Play Infocom classics (and more) on your Pico-8 <img style="margin-bottom:16px" border=0 src="/media/31158/status_line_5.png" alt="" /> <h2>Your Pico-8 just got a big graphics upgrade</h2> <p>With game graphics drawn &quot;from the limitless imagery of your imagination&quot; (according to an <a href="http://www.infocom-if.org/ads/ads05.html">old Infocom advertisement</a>), a world of classic text adventures is now playable on the Pico-8.</p> <p>Status Line implements the z-machine v3/v4 specifications, allowing you to play .z3 and .z4 text adventures like <em>Zork</em>, <em>Hitchhiker's Guide to the Galaxy</em>, <em>Trinity</em>, <em>A Mind Forever Voyaging</em> and more. There are those who continue to keep the Infocom flame alive, and their games will work as well.</p> <p><img style="margin-bottom:16px" border=0 src="/media/31158/witness.png" alt="" /> <img style="margin-bottom:16px" border=0 src="/media/31158/17_zork.png" alt="" /> </p> <h2>Features</h2> <ul> <li>Can play every game in the &quot;z3&quot; and &quot;z4&quot; format</li> <li>Custom font with multi-font display, includes mixed plain/bold/italic</li> <li>Supports game sizes up to 256K</li> <li>Supports simple sound effects (used by many z4 games)</li> <li>Save/restore games in progress</li> <li>Multiple color themes to recreate a &quot;classic feel&quot;</li> <li>Player-selectable text scroll speed</li> <li>Player-selectable cursor style, because why not</li> <li>Choose 24 or 12-hour clock for time-based games</li> </ul> <h3>Status Line Available Now at itch.io</h3> <p>Details, where to find games to play, future work, etc. can be found on the project page at <a href="https://christopherdrum.itch.io/statusline">https://christopherdrum.itch.io/statusline</a>.<br /> Source code now on github: <a href="https://github.com/ChristopherDrum/status-line">https://github.com/ChristopherDrum/status-line</a></p> <h2>Special Feature: Status Line Classics</h2> <p>I've modified a handful of original Infocom games, from original source code, to look and play great on the Pico-8. Lots of UX changes, text layout/formatting changes, etc. to accomodate the Pico-8's tiny, cozy screen. Source and playable .z4 files are available at github: <a href="https://github.com/ChristopherDrum/status-line-classics">https://github.com/ChristopherDrum/status-line-classics</a></p> <p><img style="margin-bottom:16px" border=0 src="/media/31158/qjFIYc.png" alt="" /><img style="margin-bottom:16px" border=0 src="/media/31158/bur_mixed_fonts_250.png" alt="" /></p> <h2>Update - v2.0 Released (Mar. 22, 2022)</h2> <p>This update adds .z4 game support, multi-font display, better core engine, slightly faster core performance, more compact input cursor, some deep bug fixes, and more. Status Line Classics v1.0 is released in conjunction with this update to give the Pico-8 community best-in-class adaptations of Infocom classics for our beloved machine. Extended notes and full changelog are here:<br /> <a href="https://christopherdrum.itch.io/statusline/devlog/349264/status-line-v20-released-z4-support-multi-font-display-custom-infocom-classics-and-the-resurrection-of-bureaucracy">https://christopherdrum.itch.io/statusline/devlog/349264/status-line-v20-released-z4-support-multi-font-display-custom-infocom-classics-and-the-resurrection-of-bureaucracy</a></p> <h2>Update - v1.2 Released (Feb. 13, 2022)</h2> <p>This update focuses on lowering memory usage, general performance improvements, and improved text layout handling. This puts the project in good shape for z4 game support in the near future. Write-up of the changes and the full changelog are here:<br /> <a href="https://christopherdrum.itch.io/statusline/devlog/343409/status-line-v12-released">https://christopherdrum.itch.io/statusline/devlog/343409/status-line-v12-released</a></p> <h2>Update - v1.1 Released</h2> <p>v1.1 was uploaded today to the product page on itch.io. Most changes handle various typographic inconsistencies and strive to give a more clean, consistent presentation. Additional color schemes, player-selectable cursor style, and more are also added. Write-up of the changes and the full changelog are here:<br /> <a href="https://christopherdrum.itch.io/statusline/devlog/330128/status-line-11-released">https://christopherdrum.itch.io/statusline/devlog/330128/status-line-11-released</a></p> https://www.lexaloffle.com/bbs/?tid=45892 https://www.lexaloffle.com/bbs/?tid=45892 Wed, 29 Dec 2021 01:20:44 UTC Exporting Executables Questions <p>I can't find any posts talking about this, which may just mean I'm terrible at finding thing in the BBS.</p> <p>At any rate, I'm doing Windows, macOS(OS X), and Linux executable exports. I've noticed a few things, and I need to know if this is &quot;just how things are,&quot; &quot;that sounds broken,&quot; or &quot;that is something we can fix.&quot;</p> <p>On Windows:</p> <ul> <li>The executable on first launch triggers Windows Defender. I tried codesigning the .exe with <code>signtool</code> to no avail. Is there a way to fix this?</li> <li>On first launch, the exe runs full-screen. I don't want this for my release as it relies on file system interaction via drag-and-drop. Can we default to windowed mode?</li> </ul> <p>On macOS:</p> <ul> <li>Like Windows, the unsigned app triggers a security warning. Has anyone successfully done a codesign to fix this?</li> <li>Also, the full-screen mode occurred for one person, but not for another. Does having Pico-8 installed affect how this launches? (person with Pico-8 was windowed mode on first launch; person without Pico-8 was full-screen on first launch)</li> </ul> <p>On Linux:</p> <ul> <li>The executable had no icon, but a separate .png file was in the .zip file. Is this normal?</li> <li>The full-screen mode issue occurred on my Linux machine, yet I <em>do</em> have Pico-8 installed.</li> </ul> <p>I thank the community in advance for any assistance in these matters.</p> https://www.lexaloffle.com/bbs/?tid=45886 https://www.lexaloffle.com/bbs/?tid=45886 Tue, 28 Dec 2021 13:42:44 UTC Eliza8: A Scriptable Clone of ELIZA <img style="margin-bottom:16px" border=0 src="/media/31158/eliza8_box_with_cartridge_banner.png" alt="" /> <h2>Your Pico-8 has something to say.</h2> <p>The power of MIT's Artificial Intelligence Lab (circa 1966) has been brought to the Pico-8. The software that once took on the Turing Test is now yours to command. Marvel as the illusion of a living computer breaks down within seconds!</p> <p>ELIZA's creator, Joseph Weizenbaum, once wrote, &quot;I had not realized ... that extremely short exposures to a relatively simple computer program could induce powerful delusional thinking in quite normal people.&quot; Maybe you'll be powerfully deluded as well!</p> <p>Features of this release:</p> <ul> <li>An interesting archaelogical look at early AI</li> <li>User-scriptable! (see blog for info)</li> <li>Reproduces precisely a famous ELIZA conversation</li> <li>Not based on the simplified BASIC version; this is the real deal!</li> </ul> <img style="margin-bottom:16px" border=0 src="/media/31158/eliza8_2.png" alt="" /> <p>While this release implements the most famous ELIZA script called &quot;DOCTOR,&quot; I have endeavored to make it simple to create your own script. With Pico-8's 2MiB of RAM and the light footprint of the engine itself, it is theoretically possible to create much more advanced chatbots than could have been achieved in 1966.</p> <p>More information and downloads available on itch.io now.<br /> <a href="https://christopherdrum.itch.io/eliza8">https://christopherdrum.itch.io/eliza8</a></p> <p>Full blog post on how the script works, so you can write your own is also posted.<br /> <a href="https://christopherdrum.itch.io/eliza8/devlog/255329/customizing-eliza8-scripts">https://christopherdrum.itch.io/eliza8/devlog/255329/customizing-eliza8-scripts</a></p> https://www.lexaloffle.com/bbs/?tid=42986 https://www.lexaloffle.com/bbs/?tid=42986 Fri, 21 May 2021 22:03:46 UTC making tables with unusual keys <p>Is there any way to do 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>t = { &quot;key 1&quot; = &quot;foofoo&quot;, &quot;key 2&quot; = &quot;barbar&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>We <em>can't</em> use quoted keys when defining a table, but we <em>can</em> use them when adding elements.</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>t = {} t[&quot;key 1&quot;] = &quot;foofoo&quot; t[&quot;key 2&quot;] = &quot;barbar&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>Is this &quot;just how things are?&quot; because it would really be beneficial to be able to do it all inline and build out a complex table structure without having to isolate out special cases and insert them as a separate sequence of setter calls.</p> <p>(the example above uses spaces in the key intentionally, where it might be a substring paired with its substitution or maybe I just want to make it very clear in the definition that some of the keys represent specific words, like vocabulary words; don't get me wrong, I know lots of workarounds, but sometimes the workarounds are a drag, especially when it looks like we're so close to just having a simple way of doing things)</p> <p>--EDIT<br /> Clarification here. The first example fails to compile with a &quot;missing {&quot; error when trying to use inline quoted keys. @fred72 shows below that wrapping those in square brackets allows for using the quoted key without resorting to the second method shown.</p> https://www.lexaloffle.com/bbs/?tid=42796 https://www.lexaloffle.com/bbs/?tid=42796 Fri, 07 May 2021 03:00:47 UTC ALT key as BTN blocks stat(30)? <p><em>(this &quot;bug&quot; may actually be &quot;a feature&quot;... not sure)</em></p> <p>In the following code, a simultaneous btn+key method is used.<br /> I am using Player 2 &quot;X&quot; key for this example.</p> <p>In keyconfig, set Player 2 &quot;X&quot; to be a key, like &quot;\&quot;<br /> You should find that you can hold &quot;\&quot; to get a yellow line drawn on screen.<br /> While holding that BTN down, type &quot;c&quot; and you should see a red circle flash on screen.</p> <p>Back in keyconfig, set Player 2 &quot;X&quot; to be &quot;Alt&quot;<br /> (I'm on Windows; I think the Mac Option key has the same behavior)</p> <p>When running this sample program, hold down Player 2 &quot;X&quot; and the line appears as before.<br /> Type &quot;c&quot; and nothing happens.</p> <p>I can understand not allowing &quot;Ctrl&quot; (for example) but I can't think of any &quot;would interfere with expected system operations&quot; reason why &quot;Alt&quot; would have its use restricted in this way.</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() poke(0x5f2d,1) end function _update() cls() if btn(5,1) then line(0,0,127,127,10) if stat(30) then local key = stat(31) if (key == 'c') circfill(63,63,20,8) flip() end 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=42196 https://www.lexaloffle.com/bbs/?tid=42196 Sat, 27 Mar 2021 03:01:20 UTC v0.2.2c tab issues <p>According to 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>:: Special Commands These commands all start with &quot;\^&quot; and take between none and 2 parameters (P0, P1) s set tab stop width to P0 pixels (used by &quot;\t&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>However, it appears to me that it isn't in pixels, but rather by characters.</p> <p>This code snippet</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>?&quot;1234567890&quot; ?&quot;----------&quot; for i = 1,9 do ?&quot;\^s&quot;..tostr(i)..&quot;1\t2\t3\t4\t5&quot; 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>yields this output</p> <img style="margin-bottom:16px" border=0 src="/media/31158/9_tab_control_code_problem.png" alt="" /> <p>Additionally, if \t is the first character in the string, it seems to be ignored.</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>?&quot;\t1234567890&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>outputs exactly as if no tab were included.</p> <img style="margin-bottom:16px" border=0 src="/media/31158/tab_control_code_problem2.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=42181 https://www.lexaloffle.com/bbs/?tid=42181 Fri, 26 Mar 2021 10:30:58 UTC Suppressing control-codes <p>For characters in the Japanese kana range, it seems we must type <strong>ctrl + alpha</strong><br /> to get a kana to input. However, <strong>ctrl</strong> is also used to activate some Pico-8 things like &quot;save&quot; and such.</p> <p>With <strong>poke(0x5f30,1)</strong><br /> we can suppress &quot;ENTER&quot; from bringing up the Pico-8 menu in-game.<br /> Is there a poke I'm failing to see that will suppress Pico-8 from having its &quot;save&quot; function activated every time the user enters <strong>ctrl + s</strong> to type キ (for example)?</p> <p>(on another note, backtik-surrounded text to format &quot;code snippet within a line&quot; doesn't seem to work right?)</p> https://www.lexaloffle.com/bbs/?tid=41793 https://www.lexaloffle.com/bbs/?tid=41793 Sun, 28 Feb 2021 02:41:49 UTC PicoCalc: A Fully-Functional Clone of VisiCalc <img style="margin-bottom:16px" border=0 src="/media/31158/picocalc_cover_image.png" alt="" /> <h2>Your Pico-8 just got down to business.</h2> <p>The full-featured, high-precision spreadsheet application for the Pico-8 that nobody asked for has finally arrived! PicoCalc is a feature-complete1 clone of the 1979 classic VisiCalc, which introduced the world to an entirely new category of business application. Steve Jobs said of VisiCalc, it's &quot;what really drove -- propelled -- the Apple ][ to the success it achieved.&quot;</p> <img style="margin-bottom:16px" border=0 src="/media/31158/Screenshot 2021-02-23 144152.png" alt="" /> <p>PicoCalc does everything* VisiCalc can do, with some enhancements over the Apple ][ classic:</p> <ul> <li>18.18 integer/fractional precision vs. VisiCalc's 12.<br /> Handles numbers as big as 999999999999999999.999999999999999999</li> <li>Granular error reporting!<br /> Get informed of division by zero, number overflow, and more.</li> <li>Multi-color representation of active/inactive cursor, locked titles, truncated values, and error messages</li> <li>Save and load your work</li> <li>Full arrow-key support (LOL)</li> </ul> <p>To use it effectively, you do need to know how to use VisiCalc.<br /> <a href="https://archive.org/details/bitsavers_visicorpaplcAppleIIJan82_8240804/mode/2up">Here's a manual to help you along.</a></p> <p>More information and download available on itch.io now.<br /> <a href="https://christopherdrum.itch.io/picocalc">https://christopherdrum.itch.io/picocalc</a></p> <p>*OK, I ran out of tokens and only got 99.5% in; still thinking how to hit 100%</p> <h2>Updated to 1.0.1</h2> <p>Available now. Writeup of bug fixes at itch.io.<br /> <a href="https://christopherdrum.itch.io/picocalc/devlog/226707/picocalc-updated-to-101">https://christopherdrum.itch.io/picocalc/devlog/226707/picocalc-updated-to-101</a></p> https://www.lexaloffle.com/bbs/?tid=41739 https://www.lexaloffle.com/bbs/?tid=41739 Wed, 24 Feb 2021 12:41:12 UTC V0.2.2 &quot;tall&quot; font rendering bug <p>In the new v0.2.2, it seems that &quot;tall&quot; mode for print rendering does not render the final row of pixels.<br /> See in this shot the difference between &quot;tall&quot; and &quot;wide&quot;</p> <p>Haven&rsquo;t tried it in &ldquo;non-inverse&rdquo; mode yet.<br /> Discovered by using Zep&rsquo;s &ldquo;pinball everything&rdquo; example.</p> <img style="margin-bottom:16px" border=0 src="/media/31158/Screenshot 2021-02-14 084228.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=41548 https://www.lexaloffle.com/bbs/?tid=41548 Sat, 13 Feb 2021 23:41:17 UTC Default code for functions <p>I have a number of functions which, before doing any real work, need to do the exact same pre-processing routine of the passed parameters. As such, they all start 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>local p1, p2, error = preprocess(param1, param2) if (error) return error --early return</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Is there a way to use metatables to inject this kind of default behavior into functions, without having to copy/paste that boilerplate code each time?</p> https://www.lexaloffle.com/bbs/?tid=41460 https://www.lexaloffle.com/bbs/?tid=41460 Mon, 08 Feb 2021 02:01:37 UTC -0 bug in 0.2.0c? <p>Hit a strange bug tonight in trying to compare some values.<br /> Ultimately, I was being told that 0 != 0 (apparently).<br /> In digging in further, I can reproduce the problem in one line.</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; print(8.5333-3.7667-4.7667) -0</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 understand that there can be rounding issues, but -0 is not such a useful return value I think.</p> <p><strong>Edit:</strong> Another strange occurrence<br /> I'm doing time profiling on functions in my code. Call time() at the beginning and end of a test and subtract the results. </p> <p>In the test, I received <code>37.4667 - 35.6333 = 1.8333</code> </p> <p>but if I just ask Pico-8 to compute that in the console I get the proper <code>1.8334</code></p> https://www.lexaloffle.com/bbs/?tid=37439 https://www.lexaloffle.com/bbs/?tid=37439 Sun, 19 Apr 2020 09:45:04 UTC