Cubitect / cubiomes-viewer

An efficient graphical Minecraft seed finder and map viewer.
GNU General Public License v3.0
1.03k stars 61 forks source link

Feature Request / Usability Suggestion - More clarity that string input is allowed #149

Closed mjevans closed 2 years ago

mjevans commented 2 years ago

By default the Seed: input box is filled with a random seed, and followed by (numeric).

I don't know if the word 'detected' above numeric would have helped clarify that numeric wasn't an operator filter. Minecraft the game's UI just doesn't even offer information, it simply takes the input.

An alternative might be to change how random seeds are displayed, E.G. (random) or to randomly pick between a (text) and (numeric) entry for the box. However as the input is always converted to an integer as soon as input leaves the filed the text to the right might even just be normally hidden.

The current behavior confused me to the point that I researched how Minecraft generates seed numbers from string input. ( https://minecraft.fandom.com/wiki/Seed_(level_generation)#General and https://stackoverflow.com/questions/57670060/how-hashcode-is-generated-for-a-string-object-in-java It calls String.hashCode(), which is the sum from 0 to strlen(), in signed_int_32 overflow math over h = 31 h + (int32_t)(ss[ii]); // 31 == -h + h << 5 ) I even went on a merry little trip through interactive Python to test things out, before switching to a simple toy C fragment because that was easier than NumPy.

Cubitect commented 2 years ago

There already is a (random) categorization for an empty input. I agree that (numeric) categorization is unnecessary, since it's the default, so the label is now hidden by default in 2.3.0.

Also I think it's fair to expect users to know how text seed conversion works if they choose to use them.