Do we have plans for adding an `EditorAction` for ...
# learning
m
Do we have plans for adding an
EditorAction
for editing layers/objects? I'm starting to play around with the editor and it seems like it would be a nice addition when you want to rename layers/objects.
Some more notes: Context Menu - Only "Undo" and "Redo". Both are related to the last action performed Toolbar items - Located on the left side of the editing error. Represented with 'X' (no icons atm) - Top 'X' is for placing a tile - Bottom ' x" is for erasing - Can only place and erase Objects - It seems like we can't place objects just yet when creating a map. But I think this is being handled in https://github.com/fishfight/FishFight/pull/231 ? - Objects can be loaded into the editing area from an already existing one
a
Yeah, there should be an action for that already that is used when you edit layer or tileset, by using the (somewhat incomplete) properties windows. For MapObjects, I haven't added that yet but I will do it shortly. I am currently working on implementing object placement and will also be finalizing editing of MapObjects, which will probably just consist of changing their position. [3:07 AM] I am adding a ToolbarElement that lists all available items available in Resources, when an object layer is selected (similarly to how a tileset list is shown when selecting a tile layer). To place objects you will select a prototype from this list an place it into the map at a specific position. It will not be possible to edit item parameters via the MapObjects as that should be done directly on the prototypes or by creating new ones that will, in time, be exported to the appropriate json files. I am holding back on item editing etc, though, until we have a mod system properly in place, as it should not be possible to edit the core game items directly, as this will make game data incompatible, across clients, in a network setting. In stead it will be possible to clone core items and save an edited version to a mod, or something like that, once the mod system is properly implemented.... [3:08 AM] Also, remember to implement UndoableAction for all actions that modifies map data like map objects...
m
Does the "collision" checkbox make tile layers collision objects?
a
So, I have had a busy week with a lot of editor updates. Object placement is now possible, file io has been added and parallax background support is in place in the editor. It is also possible to import tilesets from existing maps.
Once drag/drop moving of objects and autotiling is implemented, as well as an extensive round of polishing of ui, it will probably be at a stage where it is a viable alternative to Tiled.
Furthermore, all the maps have been converted to the internal format now, as there is no support for parallax backgrounds when loading Tiled maps at the moment. The Tiled originals are still kept in their own folder (
assets/tiled_maps
) but they have been removed from the
maps.json
manifest file to avoid duplicates.
So far, I have been unable to think of any practical solutions for adding background layers to tiled maps, without having to resort to a web of map/layer props or dummy layers. This will be way more confusing than the process of exporting the map to the internal format, using the editor, so I think it is better to limit the use of Tiled maps to development and testing and export them for use in releases.
In return for this inconvenience we have the possibility to create our own parallax backgrounds with full freedom to choose textures and layer count