Log In  

So I wanted to experiment with Pico-8's bitplane drawing features (see https://www.lexaloffle.com/bbs/?tid=54215) and specifically to see if I could make a palette that worked sort of like the idea behind 16-color CGA: four-channel (one bit per channel) RGBI color. (Pico-8 doesn't have quite enough blue for this to work comfortably but I'll keep experimenting.) But to play with it, I wanted to be able to scribble with the palette, drawing "with specific bits".

So I threw together a thing!

Cart #bitplane_toy-0 | 2023-09-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

This mouse-driven cart lets you scribble using a velocity-sensitive pen. Left four checkboxes in the tool panel set the high four bits of the palette mask, right four set the low four. (For some reason this made more spatial sense to my brain for where "color" and "mask" go even though it's backwards from the bits.) Click the "explosion" button to clear the drawing area. I have been too lazy to implement a KABOOM sound effect but patches are welcome.

Left click to draw, move faster for a thicker line. It's not a real art app, so the lines are really blobby. X/Z to cycle palettes (both buttons do the same thing) -- additive experiment, subtractive experiment, classic palette, secret palette; palette changes will overwrite the top 8 pixels of the drawing area with a display of the current palette.

No save feature, this is literally just drawing to VRAM (with some save-to-sprite-sheet shenanigans to restore stuff otherwise overwritten by the cursor).

Feel free to use this as a crude basis for other mouse driven drawing apps, make it do interesting things with the other mouse buttons, try more palettes, just experiment with bitplanes, etc. Code is un-minified so it should be reasonably legible.

P#134796 2023-09-23 07:08

Good idea 👌

P#134797 2023-09-23 09:48

[Please log in to post a comment]