Infinite Value (BigDecimal)

[Website] [Online Demo] [Documentation] [Public API]


Infinite Value provides complete functionality for working with numbers of realistically infinite size and precision in Unity.


It is perfect for creating incremental games (idle games), RPGs with big numbers, or mathematical/monetary applications.



Features


  • Complete, you can define integer or decimal numbers as big or as small as you want with the sharpest precision.
  • Easy to use, it behaves like any other primitive value types (int, float, etc) and can easily be converted from/to them.
  • Performant, it is usable in a real time scenario and have specific optimizations if you need to work with gigantic numbers.
  • Configurable, the configuration file allows you to easily edit how to display your values and to customize the inspector drawer.
  • Editable, full sources are included with commentary and summary.


Content


  • The InfVal structure, main part of the asset, that can contain any values and implement a ton of needed abilities like arithmetic operations, serializations, parsing, etc.
  • The InfValInputField component that allows you to easily let the user input an Infinite Value.
  • The MathInfVal and InterpolateInfVal classes useful if you want to apply complex operations to an InfVal.
  • A complete demo that you can use as a starting point for an idle game.
  • A unit tests window useful if you want to do custom changes to the scripts.


Information


This asset works for Unity version 2018.3 or higher and will be kept up to date with later releases.


Of course, it will also be updated according to feedback, reviews and comments.



Try it out


The demo can be played online here.


The full scripts, scriptable objects, arts and audio used for this demo are available when buying the asset. If you intend on creating an incremental game, it will be a solid start for your project.



Last changelogs: Version 1.2.1


  • Fixed the Pow method, which could provide wrong results in some cases.
  • Greatly improved the precision of Pow and NthRoot methods when used with a negative second parameter.