Log In  

Cart #mapshuffle-0 | 2024-04-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I made this tool for myself, for reordering levels to fix difficulty curves. But I thought I'd share it in case anyone else finds it useful.

How it works:

  • Press X to select a room, and then X again to swap the two rooms
  • Press C to preview a room
  • Maps are imported/exported manually using cstore. Cry about it :(

Note: Mapshuffle cannot import/export maps in the web player. You must download the cart and use it in immediate mode.


  • Back up your project in case something goes wrong.
  • Download mapshuffle.p8 and place the cart in the same folder as your project.
  • Open your project, type the following line into the terminal, and hit enter:
    cstore(0x0000, 0x0000, 0x3000, "mapshuffle.p8")
  • Now open mapshuffle.p8. The map and sprites should be copied over.
  • Shuffle the map to your heart's content.
  • Once it's done, type this line into the console of mapshuffle.p8, replacing "yourcart.p8" with the name of your project.
    cstore(0x1000, 0x1000, 0x2000, "yourcart.p8")
  • Finally, open your project back up and the shuffled map should be imported.

Also, credits to Maddy Thorson and Noel Berry for making Celeste Classic, which is the default map used in MapShuffle.

P#147322 2024-04-25 19:26 ( Edited 2024-04-25 19:34)


now I want to make it look like one congruent image

P#147379 2024-04-26 14:52

Cool, but definitely an offline tool. How about an online version that would be clipboard based ?
Paste a sprite sheet in it to change the sprites, paste a map to change the map, copy from window to get the map (in clipboard), choose a menu option to switch between get map and get sprite sheet when copying.
Oh, and change the map size to two line if the pasted sprite sheet is 256 sprites.
This last feature could also be added to the offline tool by checking if the map contains sprite indexes over 128.
What I really like about this approach, compared to cstore (😭), is that you get to use undo in the pico-8 editor when you eventually mess up the map, like I know I'm bound to do.

That sounds not too hard to add as a menu option, but I'd need to understand what exactly it is you want :
if it's the whole zoomed out map onscreen, that would be a half screen (64l x 128c) at 1 pixel per sprite tile, 1/4 of current mini display resolution.
If you want an image of the edited map, open "yourcart.p8" in pico-8, and from the command line, type export yourcart.map.png
If it is the map image directly from the cart into the clipboard, that's a lot more work, as you'd have to write an image encoder.
What could be simply done is export the map as two square 128x128 screenshots, map_left.png and map_right.png using extcmd('screen'), same resolution of 4 pixels per sprite tile as the current display.

P#147411 2024-04-27 02:40 ( Edited 2024-04-27 02:41)

@RealShadowCaster I was originally planning on making it fully web player compatible, but if I took the time to do that I would be stepping into "premature optimization" territory. It's already possible to copy sections of the map around without my tool. I'd like to perfect this someday but for my own purposes it wasn't really worth it.

As for CrownDeluxe's comment, I'm fairly certain they only wanted to swap the rooms around until the edges lined up.

P#147412 2024-04-27 03:00

^^ Yes, that's right

P#147426 2024-04-27 12:28

[Please log in to post a comment]