Giter VIP home page Giter VIP logo

Comments (3)

dan-simon avatar dan-simon commented on July 30, 2024

What decimal library are you using? I suspect this might be due to using decimal.js (https://github.com/MikeMcl/decimal.js) rather than break-infinity.js (https://github.com/patashu/break_infinity.js). This library is only compatible with https://github.com/patashu/break_infinity.js. From what I see of your game, you can probably switch to break_infinity.js, but I've offered some information below if not.

Generally, for most incremental games, I would recommend break-infinity.js over decimal.js due to decimal.js storing a lot of precision, more than is needed for incremental games, making calculations very slow. However, if for some reason your game has a mechanic requiring use of decimal.js, you'll need to convert numbers to break-infinity.js decimals before formatting them. I can try to help on this if that's the issue.

Alternatively, if you're using another big number library like ExpantaNum, this notation library unfortunately still won't work with that, and it may be unable to handle numbers that big even with workarounds.

from notations.

dan-simon avatar dan-simon commented on July 30, 2024

(It could also be some other issue, but it would help to have an attached copy of script.js rather than just an image because I don't want to type it out to try reproducing, and also copies of or sources for any other files you use. script.js looks to me like it should run and certainly shouldn't lead to this error on its own, for what that's worth.)

from notations.

TesteTheTestCat avatar TesteTheTestCat commented on July 30, 2024

What decimal library are you using? I suspect this might be due to using decimal.js (https://github.com/MikeMcl/decimal.js) rather than break-infinity.js (https://github.com/patashu/break_infinity.js). This library is only compatible with https://github.com/patashu/break_infinity.js. From what I see of your game, you can probably switch to break_infinity.js, but I've offered some information below if not.

Generally, for most incremental games, I would recommend break-infinity.js over decimal.js due to decimal.js storing a lot of precision, more than is needed for incremental games, making calculations very slow. However, if for some reason your game has a mechanic requiring use of decimal.js, you'll need to convert numbers to break-infinity.js decimals before formatting them. I can try to help on this if that's the issue.

Alternatively, if you're using another big number library like ExpantaNum, this notation library unfortunately still won't work with that, and it may be unable to handle numbers that big even with workarounds.

ah flip im using break_eternity.js

from notations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.