Log In  
Follow
micahcowan
[ :: Read More :: ]

Cart #46393 | 2017-11-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Char Utility Fns 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 tolower(), totitle(), and toupper() 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.

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.

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#46394 2017-11-16 20:45 ( Edited 2017-11-17 01:45)

[ :: Read More :: ]


Spritesheet Generator Demo 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.

Includes a standalone setsprites() function to use in your own projects (which must be followed by cstore() to save permanently to the cartridge). Also includes a replacement circfill() function (not stand-alone) in order to render the intended example graphics.

(Also, my first upload to the BBS.)

P#46266 2017-11-14 00:10 ( Edited 2017-12-16 23:04)

Follow Lexaloffle:          
Generated 2024-04-20 01:31:27 | 0.068s | Q:11