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

New map search function that can feasibly search the entire map #36789

Open
Ker-Nes opened this issue Jan 7, 2020 · 1 comment
Open

New map search function that can feasibly search the entire map #36789

Ker-Nes opened this issue Jan 7, 2020 · 1 comment
Assignees
Labels
Info / User Interface Game - player communication, menus, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display <Suggestion / Discussion> Talk it out before implementing

Comments

@Ker-Nes
Copy link
Contributor

Ker-Nes commented Jan 7, 2020

Is your feature request related to a problem? Please describe.
A few days ago, the option to set up on which radius the map function searches for stuff, implemented in #35709 was then later shortly removed. Thinking on the subject, I feel that there's something that can make it easier to search even the entirety of the map without creating too many problems even for someone with a weaker computer.

Describe the solution you'd like
A indexed search function that allows quick search in the whole map, at least for someone who actually knows how to code more than the very basics of JSON editing (that is, not me): Constructing an index of all non "basic" tiles (that is, not field, forest, swamp, road, river, and so forth. Maybe house too, as all cities have lots of them and until you actually explore them and see if there is anything special about them, they might as well be interchangeable), with the tile's names and locations, constructed as the player explore and reveal said tiles might allow for a very quick search, as they would not have to go through the absolute vast majority of "empty" tiles, just tiles with at least some meaning to them.

Main issue is that my coding skills are limited to very basic JSON editing, so I would have no idea even where to start with this.

Describe alternatives you've considered
An interesting thought, if even more complex, might also have an editable "don't keep track of these tiles" list, say, to allow someone playing in a mega-city map (max city size, 0 city distance) to include "forest" tiles in their search. Alternatively, any type of tile that occupies more than a set percentage of the map gets excluded from the indexing perhaps?

Another, just restoring the feature from #35709 . It would likely be the easiest solution, and it even if not an optimized search code, it's a functional one, and the radius setting would allow for both those with stronger and weaker computer to pick what value works best for them. Possibly making it a "hidden" option, that is, one that exist but would need the option files to be directly edited, might be a good idea if the issue is concern that basic users might get confused with excessive options and then get confused why their search function is freezing the game.

And yet another alternative might just be a relatively modest increase in the radius, so that even people with relatively weaker computers won't be excessively affected.

As a sidenote on the last alternative, keeping the current search code in the game (possibly accessed through a code in the search box?) even after an algorithm better for most cases is implemented, might also be a good idea, to allow players to search for tiles that might be locally scarce but generally very common (say, like a forest tile inside a huge city in a map that have enough city spacing that the normal forested areas still spawn like normal)

@Night-Pryanik Night-Pryanik added <Suggestion / Discussion> Talk it out before implementing Info / User Interface Game - player communication, menus, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Jan 8, 2020
@Ker-Nes Ker-Nes changed the title New map search function that can work search the entire map New map search function that can feasibly search the entire map Jan 8, 2020
@stale
Copy link

stale bot commented Feb 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Feb 7, 2020
@kevingranade kevingranade self-assigned this Feb 8, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Info / User Interface Game - player communication, menus, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

3 participants