Implement a "world editor"
A Solarus game is broken up into multiple maps.
Smaller maps are preferable.
- They perform better.
- Map scripts are cleaner and less error-prone.
We often want small maps to be connected, though. This can be done with worlds.
Problem: Worlds are hard
In a forum topic, several users expressed their challenges with worlds.
- Worlds can't be visualized at once. This makes it tedious to draw connected maps.
- Positioning the maps within a world is not easy.
- It's difficult to discover the worlds in a quest.
Proposal: World Editor
@Cluedrew has expressed interest in developing a solution - a world editor.
This is my suggestion for how it should work:
Quest data shouldn't be changed. It doesn't need to be changed. It seems like a bad idea that could introduce bugs. The quest files already give all the data you need.
Worlds shouldn't be shown in the file tree. Solarus 1.5's file tree did not reflect the actual filesystem, and in 1.6 there was a deliberate choice to make the file tree reflect real files in the OS. I think we should stick to that, because it's a good decision.
The world editor should be accessible from Tools > World editor. A dropdown of all worlds is generated from the quest data, and the user can switch between them.
The world editor can also be accessed from within any map, by clicking an "edit" button beside the "world" field. This would spawn a world editor tab with that dropdown already chosen.
The world editor should show all maps for that world, letting the user click and drag them to any position.
Single-clicking a map in the world editor makes it selected. The left sidebar shows that map's coordinates which can also be edited manually.
Double-clicking a map in the world editor opens a new tab with that map.
When maps are saved, the world editor is automatically refreshed.
There are still some unanswered questions. There is also disagreement about whether worlds should show up in the file tree (point 2). I suggest we have a discussion here to work out the details. It might be worth creating mockups, too.
Thanks for reading!