brettski [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=40394 One-off character render error <p>I have come across a bug with the rendering one-off characters using a binary encoded string. If they binary encoded string ends in a nul <code>\0</code> the character will not render. </p> <p>For example:<br /> <code>&quot;\^.⁸\0\0\0\0\0\0\0&quot;</code> doesn't work, the character will not render<br /> <code>&quot;\^.\0\0\0\0\0\0\0⁸&quot;</code> does work and the character renders as expected; as does other combination tried as long as the last value isn't <code>\0</code></p> <p>None of this appears to be an issue if values are not string encoded first. Using a variable to store a binary value and using it to render a one-off character works in a <a href="https://www.lexaloffle.com/bbs/?tid=45912">cart</a> regardless if there is a <code>\0</code> at the end.</p> <p>Doing this on the Pico-8 command line:</p> <h3>didn't work</h3> <p><code>print(&quot;\^.&quot;..chr(255)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0))</code></p> <h3>worked</h3> <p><code>print(&quot;\^.&quot;..chr(255)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(1))</code></p> <p>This isn't an issue when using hex values e.g.:(<code>&quot;\^:FF00000000000000&quot;</code> always appear to work as expected)</p> <p>After trying many different combinations it does appear the issue with rendering only occurs when the last value is <code>\0</code></p> <p>Tested in version 0.2.4 running on MacOS 12.1 and Windows 10</p> <h2>Example working values</h2> <div> <div style="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;A⁸⁸⁸⁸ \0\0\0\0\0\0\0◝ ᶜ▮▮▮8ム⁶&sup3;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h2>Example non-working values</h2> <div> <div style="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>ᶜ▮▮▮8ム⁶\0 ◝◝◝◝◝◝◝\0 ◝████◜█\0 ○█\0\0█ᵉ█\0</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=45915 https://www.lexaloffle.com/bbs/?tid=45915 Fri, 31 Dec 2021 01:20:03 UTC Paint a Char <h1>Paint a Char</h1> <p>A utility for creating <a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html#One_off_characters">one-off characters</a> for use in other carts.<br /> Immediate load this cart by <code>load #paintachar</code></p> <p> <table><tr><td> <a href="/bbs/?pid=103849#p"> <img src="/bbs/thumbs/pico8_paintachar-5.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=103849#p"> paintachar v2.4</a><br><br> by <a href="/bbs/?uid=40394"> brettski</a> <br><br><br> <a href="/bbs/?pid=103849#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Creating and exporting</h2> <p>Paint your desired character and send to the clipboard using &quot;c&quot; button.<br /> Select the type of output desired being Hexadecimal string or Binary String.<br /> Press &quot;x&quot; to clear and start new.</p> <h2>Importing</h2> <p>Import hex codes to verify how they look, or edit them further.<br /> To import a hex code:</p> <ol> <li>Set Paint a Char to <em>receive hex from clipboard</em></li> <li>Copy the 16 digit hex code you want to import</li> <li>Paste (e.g. ctrl-v) the value in to the app <ul> <li>The import will not work if you don't past the value into the app first</li> </ul></li> <li>Press &quot;O/C&quot; to import the value </li> </ol> <p>You should now see that hex code's rendered one-time character.<br /> Only importing hex codes is supported at this time. </p> <h2>General Info</h2> <p>Use the output of this cart for creating <a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html#One_off_characters">one-off characters</a> in your PICO-8 projects. </p> <p>For binary encoded string you prefix the value with: <code>&quot;\^.&quot;</code><br /> For hexadecimal string you prefix the value with: <code>&quot;\^:&quot;</code> </p> <p>example cat (hex): <code>print(&quot;\^:447cb67c3e7f0106&quot;)</code><br /> example cat (bin): <code>print(&quot;\^.$|へ|&gt;○&sup1;⁶&quot;)</code> </p> <h2>Known issues</h2> <p>The binary output to the clipboard may not working correctly. There is an issue with the one-off character feature when a binary encoded string ends in a <code>\0</code>. In this condition, nothing renders. If the last line in your character is blank, I suggest you use <strong>hex</strong> output for now for that character. A bug report has been open <a href="https://www.lexaloffle.com/bbs/?tid=45915">here</a><br /> **NOTE: This issue has been corrected in v0.2.4b</p> <h3>Version Information</h3> <ul> <li>v1 (30Dec21) <ul> <li>Initial Release</li> </ul></li> <li>v2 (31Dec21) <ul> <li>Add import functionality</li> <li>Change layout per feedback</li> </ul></li> <li>v2.1 (31Dec21) <ul> <li>Update instruction wording</li> </ul></li> <li>v2.2 (1Jan22) <ul> <li>Additional check for invalid imported hex value</li> </ul></li> <li>v2.3 (8Feb22) <ul> <li>Exports control character with value</li> </ul></li> <li>v2.4 (11Feb22) <ul> <li>🤦&zwj;♂️forgot to escape the control character</li> </ul></li> </ul> https://www.lexaloffle.com/bbs/?tid=45912 https://www.lexaloffle.com/bbs/?tid=45912 Thu, 30 Dec 2021 23:03:23 UTC Brettski Mines 2 <p> <table><tr><td> <a href="/bbs/?pid=85757#p"> <img src="/bbs/thumbs/pico8_brettski_mines2-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=85757#p"> brettski_mines2</a><br><br> by <a href="/bbs/?uid=40394"> brettski</a> <br><br><br> <a href="/bbs/?pid=85757#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Mines2</h1> <p>Back at it with a refactored version of the first Mines game. The goal here is learning and fun, and this project has been both of those for me. </p> <h2>Play</h2> <ul> <li>Arrow keys to move around</li> <li>x to select tile</li> <li>z to set flag on tile</li> </ul> <h2>Features</h2> <ul> <li>Minesweeper clone ('cuz there ain't enough of them)</li> <li>Level-progression game play</li> <li>Game field scrolls larger than game view to support super-big game fields</li> <li>Field continues indicator arrows</li> <li>Better performance at 30fps</li> <li>Intentional no mouse control to support handhelds</li> </ul> <p>Hmm, that was shorter than I expected :). I wanted to refactor what I did in the first one and add levels. Which I did and they are working. It still ugly, but, well, okay. Could use some sound and music too 😉</p> <p>Thank you for reading.</p> <p>A wide field example: </p> <img style="" border=0 src="/media/40394/Brettski_Mines_200.jpg" alt="" /> https://www.lexaloffle.com/bbs/?tid=40915 https://www.lexaloffle.com/bbs/?tid=40915 Fri, 25 Dec 2020 03:57:40 UTC Brettski Mines <p>Yet another mines clone.<br /> Still working out </p> <ul> <li>some of the end game flag logic</li> <li>surrounding graphics</li> <li>levels</li> <li>sound affects</li> </ul> <p> <table><tr><td> <a href="/bbs/?pid=74862#p"> <img src="/bbs/thumbs/pico8_brettski_mines-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=74862#p"> brettski_mines</a><br><br> by <a href="/bbs/?uid=40394"> brettski</a> <br><br><br> <a href="/bbs/?pid=74862#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=37400 https://www.lexaloffle.com/bbs/?tid=37400 Sun, 25 Oct 2020 00:24:04 UTC Clock <p> <table><tr><td> <a href="/bbs/?pid=78344#p"> <img src="/bbs/thumbs/pico8_brettski_clock-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=78344#p"> brettski_clock</a><br><br> by <a href="/bbs/?uid=40394"> brettski</a> <br><br><br> <a href="/bbs/?pid=78344#p"> [Click to Play]</a> </td></tr></table> Hey so I built a clock. Just because :) </p> <p>It actually turned out to be a pretty fun little project.</p> <p> <table><tr><td> <a href="/bbs/?pid=78344#p"> <img src="/bbs/thumbs/pico8_brettski_clock-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=78344#p"> brettski_clock</a><br><br> by <a href="/bbs/?uid=40394"> brettski</a> <br><br><br> <a href="/bbs/?pid=78344#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=38502 https://www.lexaloffle.com/bbs/?tid=38502 Sun, 21 Jun 2020 00:12:46 UTC