Log In  


Cart #vec8-0 | 2025-04-08 | Embed ▽ | License: CC4-BY-NC-SA
8

Vec8 is a tool to generate vector/command based graphics for Pico-8 while minimizing data length and token usage.

It allows you to create a series of images and export them to a series of compressed pixels to be stored in your Pico-8 sprite map. Future plans might include exporting to a string.

The Pico-8 code to load and draw these images only takes 198 tokens (if not using any polyfill elements, otherwise +646 tokens)

There may be future updates to support things like text or custom user defined data.

Exported images to you're Pico-8 cart might look something like this:

this potentially allows you to store way larger and/or way more images than you would be able to otherwise in Pico-8.

Then drawing these compressed images is as simple as:

function _init()
	load_vec8_assets()
end

function _draw()
	cls"0"
	draw_v8(1,0,0)-- image id, x, y
end

You can use any of Pico-8's 32 colors and remap them to one of the 16 colors, but you are required to set up the palette as such in your game. The vec8 library does not do this for you.

You can also import Picotron graphics and use it with the sprite tool. this allows you use sprites from your Pico-8 cart or use graphics imported into Picotron to use as a guide to trace over with vector-based shapes.

Instructions for exporting are included when opening the export panel.

There are likely some bugs. Save often. The clone tool has known issues if you set it up to recurse infinitely.

After drawing an element, you can use the arrow keys in addition to 1-4 keys to select corners to move the selected elements around. If mouse-dragging is highly desired, I may add that in the future.

You'll need the desktop version of Picotron in order to save and open your files.

To see a game that has utilized this tool, check out Loong Triune

8



[Please log in to post a comment]