Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planet selection zone doesn't adapt #32

Open
beccabunny opened this issue Mar 28, 2020 · 3 comments
Open

Planet selection zone doesn't adapt #32

beccabunny opened this issue Mar 28, 2020 · 3 comments
Labels
bug UX Changes related to improving usability, via both code and better docs

Comments

@beccabunny
Copy link

beccabunny commented Mar 28, 2020

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

@tehhowch tehhowch added UX Changes related to improving usability, via both code and better docs bug labels Mar 28, 2020
@maltedreschert
Copy link
Contributor

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
Copy link
Collaborator

tehhowch commented Apr 24, 2021

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:

  • star sprites
  • planet sprites
  • fleet names
  • commodity names

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug UX Changes related to improving usability, via both code and better docs
Projects
None yet
Development

No branches or pull requests

3 participants