-
Notifications
You must be signed in to change notification settings - Fork 140
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
bignum #7
Comments
https://www.reddit.com/r/swarmsim/comments/2g97zf/what_is_your_strategy_for_using_injections/ckhinow numbers are getting bigger, this is getting more urgent otoh, with the inject cap coming (#65) this might become less urgent |
this'll have to wait for the next reset. #123 makes 0.2.0's release too urgent. hopefully the new limitations on clone (inject) keep numbers smaller this time. there's lots of other new bonuses though, and more clones are possible than before if games stretch over weeks... we'll see. |
people are getting above 1e180 without prestige bonuses. I think prestige is going to make this more urgent. |
no-unit-selected updates fine, and shows numbers bigger than 1e300. problem is, it's unusably slow. need to do some profiling before this is useful.
good news: bignum wasn't too tough to get functioning. replace all js-math with math.eval(). bad news: it's unusably slow. like, with just meat/drones/larvae, I couldn't get more than 2 fps. put the changes in their own branch for now. it'll need some profiling and optimization before it's usable - I'm sure there's some overhead to math.eval(). those are big refactorings though, and profiling is misery. it doesn't look like prestige will exceed 1e300 anyway, let's wait and see if testers agree. |
took another shot at this with math.js functions and then with decimal.js. both were faster than math.eval, but still very very laggy - not promising enough to spend more time on this. |
this is a priority again; it's possible to reach 1e300 legitimately and I'd rather not nerf everything (finally) got it up to a playable speed! reworked caching everywhere; all memoize() calls are gone, replaced by a Cache class on game with fewer coarse-grained clearers (tick for counts, update for most others). a couple of tests are still upset and some template formatting is still screwy (percents) and some less visible stuff (achievements, analytics, statistics) is still busted, and the 1e300 cap is still (deliberately) in place; nothing showstopping. I now think this is doable after all. having more types of units active makes a noticeable difference in speed: 80% idle with just drones, to 15% idle with all meat units active. same thing in prod though, so it's okay. chrome cpu profiler is awesome. (wish I could say the same for memory, #168) |
pushed this to publictest, at last. caught everything I could. the 1e300 limit's not yet lifted, but decimal.js is deployed on publictest for real. let's see what people break before raising the limit. |
still a few bugs, but we're doing well enough to call this done and raise the cap. start with 1e400, raise it more later. |
maxing out javascript's numbers isn't impossible here,especially if people manage to produce larvae faster than I planned (reset bonuses later?). use bignums. we're already using mathjs, which has them.
This must be done before 1.0 because it might impact save states, and we can't reset people after that.
The text was updated successfully, but these errors were encountered: