swarmsim / swarm

Swarm Simulator, an idle game with lots of bugs.
https://www.swarmsim.com
GNU General Public License v3.0
481 stars 141 forks source link

can't buyN more than 1e308 units at once #281

Closed erosson closed 9 years ago

erosson commented 9 years ago

this is a limitation of <input type="number">, apparently: http://jsfiddle.net/jgeau6nm/1/

what to do about this? text-input doesn't have spinners or the number-only mobile keyboard.

erosson commented 9 years ago

related: it'd be nice to allow inputs in formats besides "1e6", like "1b" or "1qa", which are also not possible with type=number.

technocoreai commented 9 years ago

Safari limits number inputs to 1e38, which really limits mutation purchases (although I guess I could temporarily switch to Chrome and then port the save back).

technocoreai commented 9 years ago

Maybe add an option to render input fields as plain <input type="text">? I've never used the spinners and on a desktop browser there really aren't any other benefits.

erosson commented 9 years ago

input type="text" will probably just become the default at some point, with no option. the spinner's not terribly useful on desktop because swarmsim has such big numbers, and the number-only keyboard on mobile is kind of nice but doesn't allow input like 1e10 so it's not a big loss. allowing other input formats and resolving the bugginess around type="number" is worth it.