micahcowan [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=26467 Character Utility Functions <p> <table><tr><td> <a href="/bbs/?pid=46394#p"> <img src="/bbs/thumbs/pico46393.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=46394#p"> Character Utility Functions 1.0</a><br><br> by <a href="/bbs/?uid=26467"> micahcowan</a> <br><br><br> <a href="/bbs/?pid=46394#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Char Utility Fns</strong> is a non-playable cartridge with some utility functions for categorizing and manipulating character strings, including conversion to and from string characters, and numeric code points. It also has <strong>tolower()</strong>, <strong>totitle()</strong>, and <strong>toupper()</strong> functions to take advantage of the lower-case (well... small caps) letters that are available in the PICO-8 font, but which may not be typed in cartridge source code.</p> <p>This project was primarily for my own education, and also theoretically for use as a library of useful char-manipulation functions... but since it takes up almost 400 tokens on its own, it'd be a fairly costly library, especially if you don't have need for all the facilities provided. Still, it could be edited down to include just the parts you want to use in a game. I think being able to print title-case messages is particularly neat; I might think about creating a version that only provides the tolower(), totitle() functions, since that was the main thing I was interested in while creating this.</p> <p>As a curiosity, the source code also demonstrates some advanced function techniques; notably, the use of a top-level, anonymous function to contain/hide some local values - and local functions - that are used to construct some of the actual functions that are exported globally. (The same technique is quite common in many popular JavaScript code libraries.)</p> https://www.lexaloffle.com/bbs/?tid=30273 https://www.lexaloffle.com/bbs/?tid=30273 Thu, 16 Nov 2017 20:45:48 UTC Spritesheet Generator Demo <p> <table><tr><td> <a href="/bbs/?pid=46266#p"> <img src="/bbs/thumbs/pico46265.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=46266#p"> Spritesheet Generator Demo 0.1</a><br><br> by <a href="/bbs/?uid=26467"> micahcowan</a> <br><br><br> <a href="/bbs/?pid=46266#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Spritesheet Generator Demo</strong> is a cartridge that demonstrates how to save on-screen graphics into a cartridge's permanent sprite memory. Useful for programatically generating sprites. It is not a useful/playable cart; it is intended for use as example code.</p> <p>Includes a standalone <strong>setsprites()</strong> function to use in your own projects (which must be followed by <strong>cstore()</strong> to save permanently to the cartridge). Also includes a replacement <strong>circfill()</strong> function (not stand-alone) in order to render the intended example graphics.</p> <p>(Also, my first upload to the BBS.)</p> https://www.lexaloffle.com/bbs/?tid=30253 https://www.lexaloffle.com/bbs/?tid=30253 Tue, 14 Nov 2017 00:10:10 UTC