endless-sky / endless-sky-editor

Map editor for the Endless Sky universe.
GNU General Public License v3.0
68 stars 44 forks source link

Planet selection zone doesn't adapt #32

Open beccabunny opened 4 years ago

beccabunny commented 4 years ago

Screenshot (1505) Currently, the area from where a planet can be selected doesn't expand on some planets, which makes it difficult to select them

maltedreschert commented 3 years ago

The problem here is that the selection area is tied to the radius value of the planet. The radius values are stored in the StellarObject::INFO map. If a planet type is not in this list, a default radius value of 40.0f is used. One fix would be to add all the missing planet types in this map (i.e. planet/gas1-b). But I don't know what impact that has on the game.

tehhowch commented 3 years ago

The fix is a complete rearchitecting of the editor to not have hardcoded data, but to parse user-supplied data, e.g. #30 . (This will not affect the actual game.)

I would envision this eventually taking the form of parsing the same directory tree as the map file by default, but allowing the user to specifically supply a path to a resource directory if they choose (via a menu option e.g. "Load Resources").

Data that could be loaded as part of this would include:

A much easier solution is to parse a specific file, by default one located in the editor's directory, with an appropriate name such as "stellar-objects.txt", which is at first the same data currently hardcoded into the editor. With this approach I would expect a "load resource file" menu option, to allow the user to load a file of their choice that contains all the data the editor needs for that type of data.

maltedreschert commented 3 years ago

I totally agree with you here. It makes total sense to connect it to the game directly. My only question is, how annoying is this bug vs how long does it take to redesign the architecture. Adding the missing values is quickly done but an annoyance to maintain, but if it helps the designers short term it might be worth it.