I made a map maker for Pico-8! Unlike the built in map editor, it represents maps a little differently -- the format is a collection of rectangular tile fills + a bunch of entities you can place on top. It saves all maps together in a custom data format to the cartridge's shared map/tileset area. It has undo, redo functionality on the tile layer. And there's fun sfx as you edit stuff! The main benefit of this tool is that for maps with simpler layouts, expressing a map as a set of rectangular fills is much smaller than a 16x16 tilemap, so you can hold a lot more screens of map data than using the direct map editor. The less objects, the less map space required.
Anyone can feel free to alter this or reuse bits for their own maps. I made this for a little rpg project I've been planning out, and just to have fun. In-game instructions are included, but assume a default keyboard layout, rather than describing things in terms of player 1 and player 2 buttons. But I've included them here as well, for good measure!
Z = draw
X = undo
S = redo
A = tileset
Z = draw
A = tileset
Z = acccept
X = cancel
F = file menu
E = toggle between draw and entity mode
There's no import/export cart functionality, but it's easy enough to add with reload()/cstore(), or just copying the data out of the gfx section in the p8 file.
Thank you for uploading this! This might be what I need - I've been storing map data in the code because I didn't want the hassle of having to write an editor or getting into writing to other carts, but this might be the push I needed...
Thanks! Yeah feel free to mess with it to your liking or take ideas if it helps! Right now it just saves directly to its own cartridge data. But should be easy enough to add in a menu or something, or copy out of the gfx in the cart by hand (how I've been doing it for now hahah)
The code in the editor isn't the most organized, but hopefully it's simple enough to follow along. Was just going for something simple that gets the job done. Lemme know if you need a hand with it! or if you need a loader for the maps separately from the rest of the editor code.
(Also: It took me a bit to realize you could download the carts on the BBS by clicking the thumbnail. Any way we could have a separate link that says Download, and directly downloads the cartridge png file instead of showing it on its own page? like with content-disposition HTTP headers or something to skip right to the download prompt.)
Holy cow, looks like you could save a lot of maps this way. The interface for the editor is also really nice. I'm impressed.
I wonder how much of a story or unique scenarios you could fit into an RPG using this method of map storage... Depending how it was done, you could make a pretty large game by PICO-8 standards.
This is simply marvelous !
Also opens my eyes to a type of data storage I never considered. To me a map is it's x times y and here ... you are doing something quite different and special.
I wish I could run this on my PSP 1000. Could really dabble in this for hours when I'm away from home.
Superb interface, cute tiles, and the ability to program as well. Definitely deserves my star - and favorited.
BTW, you can save a byte of storage for each X/Y coord by combining them to a single byte.
X+Y*15 instead of (X=0-14 + Y=0-14) which takes 2-bytes. Using an MSB you can break that data even smaller for single tiles, to take 1-byte.
Really something to sink my brain into for the next few weeks. Well done !
[Please log in to post a comment]