I am trying to make a cookie clicker type game for fun and I ran into a problem. As you get into bigger numbers in a lot of games, cookie clicker for example, the counter doesn't just have a 20 digit number up there, instead it takes the multiple of a thousand i.e.(million, billion, trillion) and so on. I was wondering how I would make this possible so that it can display a drastically high number while still being user friendly and still have the possible math operations applied to it. An important note is that when it passes 1000 of the certain suffix then it rolls over to the next, on the other hand if it goes underneath 1 then it rolls back a multiple of 1000. If anyone has an idea it would be really helpful.
How to handle big numbers in java script
72 Views Asked by Yolo2116 At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in BIGNUMBER.JS
- How to format BigNumbers.js to min and max decimals
- bignumber.js modulo negative returns incorrect value
- Cannot compute large numbers with great precision in JavaScript
- How to declare an item as a BigNumber with TypeScript & zod
- Ethers BigNumber to USD conversion
- Typescript Convert a Bignumber Array to a normal number TypeError: array.toNumber is not a function
- How to divide numbers in JavaScript to arbitrary precision (e.g. 28 decimal places)
- How to convert Big Number to decimal
- How to get only the _Hex Value
- testing solidity - Error: invalid BigNumber value, when passing object as argument
- How to handle big numbers in java script
- JavaScript and big numbers, calculating reserve data erc20 and bep20
- Handling rounding issue with BigNumber
- What's the point of converting to BN twice?
- is nodejs cheating when comparing to big numbers?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Here's an example using regular javascript numbers. This outputs a number less than a thousand plus a symbol