Log In  


Cart [#39737#] | Copy | Code | 2017-04-17 | Link

LLE is a map editor that supports multiple map layers, stored on cart as different sections of the map. Currently you can paint, fill, pan around, zoom, and even save your work, but I'm not counting it feature complete until I finish undo and copy/paste. For demo purposes the cart comes with a small selection of tiles and a level made with them to show off the editor. As for how to use it...

Usage begins in the code, at the top of the code there are variables for the name of your cart, the overall size of the level in map cells, and the starting points of each layer of the map. Theoretically, there is no upper limit on the number of layers, however the UI may run out of room for buttons for them.

Current editor features:

Save and Load - The active level can be saved and reloaded from the pause menu
Full Screen - The sprite window can be hidden from view
Zoom - The level can be zoomed from 25% to 200% in increments of 25 points
Pencil - LMB to place a sprite in a cell, RMB to select the sprite under the cursor
Hand - Pan around the map
Bucket - Flood fill an area of the map with the selected sprite
Layer Selector - Choose which layer to draw to with LMB
Layer Visibility - Right clicking a layer on the selector will toggle that layer's visibility
Sprite Selector - Choose any 1x1 sprite, from any page, with indicator of current sprite
Infobar - The infobar reports on location of mouse, status of saves, etc.

I'm likely going to keep adding features after undo and copy/paste, so feel free to suggest something :)

P#39738 2017-04-17 15:31


Oh wow... this is just perfect timing.

I'm planning how best to build the level (room) editor for SCUMM-8 and you appear to have already proven some concepts I was thinking about. Seriously, well done! :o)

I wondered if it would be acceptable to require users to specify the cart (or in my case, carts) to import/export to - rather than relying on an in-editor "keyboard". Seeing yours in action gives me confidence that's the way to go.

In my editor, I'd have liked to give ppl the ability to edit actual sprites, rather than making them crack open the other cart, edit it, then reload in editor. Dunno if that's a feature you'd be interested in?

Of course, I hadn't thought far enough of how to actually implement it! - I wondered about letting users take advantage of PICO8's built-in editor, but as soon as your press ESC, there's a risk of losing any unsaved data. On the other hand, re-inventing the sprite editor seems redundant.

Would you mind if I "take inspiration" from some of your editor code? Ultimately, my game editor will be VERY specific (unlike your usefully-generic editor), as I'd want to provide ability to edit room/object/actor data all in one place.

Either way, congrats on your progress thus far! :o)

P#39751 2017-04-18 01:28


Thank you! I honestly hadn't thought about losing unsaved data when the user hits ESC, but I was thinking about creating a packed string representation of levels, and I can probably use that to autosave to the clipboard.

As for editing sprites, I feel ya, it's awkward to have to go in and out of two carts with any regularity, but I generally believe a program should do one thing and do it well, a belief well suited to the limits of PICO-8. Maybe if there was a way for one cart to cede control to another cart without overwriting what was already in base ram... Anyway, feel free to borrow some ideas; I based this app on the level editor in RPG maker, I'm using the same basic UI as the builtins, and I wouldn't have even attempted this if not for Tiny Animator by TRAVERSAL_DOG (thanks btw), so if LLE inspires you go ahead.

P#39759 2017-04-18 14:54


Good idea about the clipboard. If it helps, I think musurca's PiCAD has a similar auto-save feature (albeit, I think his prints to a file).

I like your point about "a program should do one thing and do it well" and I think you're right; I guess it's also in line with the Single Responsibility part of SOLID design. So, I may rethink trying to make an editor that's an all-in-one job. Either way, certainly given me something to think about.

Thanks again and all the best with your editor! :D

P#39769 2017-04-19 01:11

Log in to post a comment


New User | Account Help
:: New User
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2017-04-26 19:42 | 0.190s | 1572k | Q:17