farkam135 / GoIV

https://www.reddit.com/r/goiv
Other
372 stars 141 forks source link

Decide what should be the order of pokemons in the dropdown after recognition #130

Closed Blaisorblade closed 7 years ago

Blaisorblade commented 7 years ago

Because of candy-based detection and issues with it (#129), pokemons are sometimes misrecognized as their base form. That wouldn't be so bad, except that the right Pokemon is far away in the list, because the list is in alphabetical order. Using Pokedex numbers this would be solved.

Blaisorblade commented 7 years ago

There's a bunch of different ideas, so I'll try collecting them together to get some consensus?

Blaisorblade commented 7 years ago

First, #131 is improving the base logic.

limiting the list to relevant pokemon? And then listing the rest? I think the rest should still be listed in alphabetical order to make them easy to find.

Based on #131, the list of relevant pokemons would be detected based on candy, and then the rest could be sorted by how well they match with the name.

Eccenux commented 7 years ago

I think best way would be to have pokedex sorting for now as it is always in evolution order currently.

But it would be great to make a combobox to be able to filter the dropdown (e.g. type in "fairy" to quickly get to Clefairy)... Of top of my head I don't remember if there is a standard filterable combobox in Android.

hlplulustg commented 7 years ago

I think best way would be to have pokedex sorting for now as it is always in evolution order currently.

Still that would only postpone a future solution. Evolution order by pokedex will change with Gen 2.

sarav commented 7 years ago

I have a suggestion.

  1. First pokemon is the detected pokemon.
  2. The next set of pokemon are the ones with similar candy, in pokedex or alphabetical order among them.
  3. The rest are sorted by name,

(1) -- because I don't want to scroll up to find more pokemon. I quickly lose track if I need to find the original pokemon again. (3) I think once we do (1) and (2), sorted alphabetically is the most user friendly option. No one remembers the pokedex order.

@hlplulustg Can you give an example just so I'm confident about your claim?

Eccenux commented 7 years ago

Currently (1) and (2) are true (as long as pokedex is sorted by index).

Doing (3) would require creating a new sorted list (currently Spinner is fed directly with pokedex). This would make the app consume more memory (not sure how much more). Memory consumption is important as this is the most likely reason for GoIV/PokemonGO to crash (at least on my 2GB phone).

hlplulustg commented 7 years ago

@hlplulustg Can you give an example just so I'm confident about your claim?

Pichu 172 -> Pikachu 25 -> Raichu 26

Blaisorblade commented 7 years ago

Regarding (3):

This would make the app consume more memory (not sure how much more).

The pokedex has 150 entries—any bitmap we manipulate for OCR is much bigger than that. And to really save memory we should use a profiler.


Regarding Gen 2: there's also Eevee getting more evolutions.

And if Pikachu candy isn't renamed to Pichu candy (which I guess nobody knows because Gen 2 didn't have candy, right?) the candy name won't be any more always the first pokemon in the evolution family. (Just mentioning, we should ignore this for now).

sarav commented 7 years ago

@Eccunux (1) isn't true today. If it's a chameleon and I need to pick Charmander I need to scroll back. And if I accidentally scroll back too much, it's hard to find it again.

If it was the top one, I just need to scroll all the ways to the top to find the original one.

Blaisorblade commented 7 years ago

Apparently @nahojjjen also has ideas (#159)—that PR is related to what @sarav would like, but not the same.

Blaisorblade commented 7 years ago

@sarav @Eccenux opinions on #159? It was merged but reverted in #161, so that we find something we all agree on.

@nahojjjen has never seen candy misrecognition—has anybody actually seen it? IIRC @sarav is most worried about it...

Eccenux commented 7 years ago

Regarding Pichu - I don't think we will see Generation II any time soon (probably months) ;-). So I wouldn't worry about that now.

Regarding #159 the problem is you might still need to change to something else then in the evolution chain. So I agree this would not be good. At least not as an only option.

I'm not sure how to resolve this though. I still think combobox would be nice, but would have to be above the keyboard, which is kind of hard to do because the main view is chained to the bottom of the screen...

Blaisorblade commented 7 years ago

Discussion died down, and we've seen seen a few bugs on candy detection. In particular it won't work for languages with the "unexpected" candy order that we don't hardcode support for (as discussed in #193).

I'd settle on "Evolution family + rest in alphabetic order", I've seen on Reddit users complaining because they don't know the pokedex order, and even ones that knew it agreeing alphabetic order would be fine. Somebody should resurrect the logic in #159 and change the policy; I might do that if somebody doesn't beat me to it.

nahojjjen commented 7 years ago

I had a thought of what I'd think would be the ideal functionality:

The dropdown box shows only the pokemon that is in the evolution chain taken from the candy, plus an extra element called "search other", which when clicked brings up a searchbox

Blaisorblade commented 7 years ago

Sounds good: a search box is probably better than scrolling through 151 pokemon :-)

mattaereal commented 7 years ago

I liked @nahojjjen's proposal.

nahojjjen commented 7 years ago

I have started working on some sort of solution for this in https://github.com/farkam135/GoIV/tree/pokemonDropdownSelector

But I dont think I'll add the "search for other pokemon" as a list item in the original spinner, as that'd be too much work for me right now.

Blaisorblade commented 7 years ago

Fixed by #308. Closing.