Log In  

Cart #20597 | 2016-05-15 | Code ▽ | Embed ▽ | Forks ▽ | License: CC4-BY-NC-SA
18

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!

DRAW MODE
Z = draw
X = undo
S = redo
A = tileset

ENTITY MODE
Z = draw
A = tileset

MENUS
Z = acccept
X = cancel

OTHER
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.

P#20596 2016-05-15 00:36 ( Edited 2016-05-17 06:59)

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...

P#20619 2016-05-15 16:34 ( Edited 2016-05-15 20:34)

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.)

P#20678 2016-05-16 23:57 ( Edited 2016-05-17 03:57)

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.

P#20681 2016-05-17 02:59 ( Edited 2016-05-17 06:59)
:: dw817

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 !

P#68826 2019-10-13 04:31 ( Edited 2019-10-13 04:55)
:: dw817

Wanted to point out, @zep. While this program runs fine online and has audio, if you download the cart or even play it from SPLORE.

load #20597

There is no audio ! Investigating the cart shows no audio was transferred. It is blank.

Saving the cart to your HD as a .p8. Investigating the code with notepad reveals the audio is there.

__sfx__
010100003e11532115000003560300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
01040000301112f1112d1112b1112911128111261112411117700157001370011700107000e7000c7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
01040000241112611128111291112b1112d1112f11130111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010800001a11526115000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
01080000324131a403300001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010600002611532115261153e1150e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010400000e21126211322110c21500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010800003c6351f3330c0331f3330c0131f313100230c0130c600186000c600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
01060000184151a4151c4151d4151f415214152341524415000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011000001842500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011000000c42500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010200000c4210e4211042111421134211542117421184211a4211c4211d4211f421214212342124425244250c0000c0000c0000c0000c0000c0000c0000c0000c0000c000000000000000000000000000000000
01060000240152b0153c0150c00518005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
01080000240152b015300152b01537015000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Loading it back in Pico-8, the audio is not there. Tiles are not there either. Something to investigate.

P#100514 2021-11-21 00:45 ( Edited 2021-11-21 00:55)
:: dw817

... update. Ok I managed to get it load properly. What did I do ? I loaded the SPLORE version. Did not run it. Saved it. Then edited the .P8 file manually in notepad to show current version and not the older version ID it had.

Then saved it back. Then loaded it, then the audio and sprites appeared.

Zep it stands to reason that some carts with very old IDs are having difficulty keeping up with modern Pico-8. Still something to be investigated. In any case, I am posting the modified Little-Map-Maker here and it should run fine in Splore and everything else with the upgraded Pico-8 version #.

Cart #sadabasija-0 | 2021-11-21 | Code ▽ | Embed ▽ | Forks ▽ | No License

P#100515 2021-11-21 01:30

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-09-29 08:44:01 | 0.009s | Q:26