User Tag List

Page 6 of 8 FirstFirst ... 4 5 6 7 8 LastLast
Results 51 to 60 of 73

Thread: Any way to get around the Fusion number limit?

  1. #51
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Yes, extremely easy to use,
    I've dropped the "add to / sub from" use approach because we want to handle big inputs,
    but it's anyway very simple - you have to set a string, like:

    set add_value to 123456789123456789

    will add 123456789123456789
    to the stored number (starting from 0)

    (setting a negative value, will *hopefully in the future* subtract that value )

    each object can store a single very big number


    but.... you can see for yourself how easy it is
    I'm going to share this early version
    because I'm a bit puzzled:

    (edit :: attachment updated, see below)

    as I said I was testing side by side with windows calculator ("scientific" mode),
    and with this addition:

    333333504758475681127676754
    +
    33333312618961891978191918988888888


    I got this result on the windows calculator: 33333645952466650453874046665641
    which looks uncorrect, as it's shorter than the second value added??

    and this result with my tool: 33333312952295396736667600116565642
    which I double checked on this website: https://defuse.ca/big-number-calculator.htm
    and seems to be correct..?

    Is the Windows calculator wrong? Would seem so.
    Did I hit its range limits? According to online documentation, should be almost infinite.

    So if you or anyone else wants to test with the windows calculator
    and/or other tools to doublechek if the code works correctly,
    they are very welcome


    ** Note it's an early version, you can only add
    should work with multiple instances too, but I've not tested
    (nor tested with any exporter still)

  2. #52
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    So, here's the widget in more definite form, with subtraction:

    very_big_int.mfa

    test (very) thoroughfully

    but DON'T use the Windows calculator
    it's clearly bugged:

    5066660653087595644656454654654654 -
    1566450644656454454546512
    =

    windows calculator:
    50666604980089821749952002000034

    very big int tool:
    5066660651521145000000000200108142

    windows calculator was wrong again
    (making me go crazy while debugging...)

    you can use one of these instead:
    http://www.ttmath.org/online_calculator
    https://defuse.ca/big-number-calculator.htm

    so far, the widget gave same results as the ones above in testing

    but test extensively, particularly with subtraction
    if something odd pops out (wrong values, 0000es on the left, freezes, whatever)
    please let me know, possibly with the starting value and the values you added/subtracted

    If suits your needs, and you also would like to display "short form" of result (1K 3@ 4§)
    this could be done, but would require additional looping

    directly adding values in "short form" (+1K, -3@ etc.) could also be done, if needed...

  3. #53
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    This looks great as far as I see yet! How often do you get this errors with negative values? I did not seem to get it I think, but it was hard to know since there is so big numbers and my math is not so great so I can see if it is correct. The times I double checked it seemed right.

    K,M,B would be great! Also it is possible to make it so the button stimulates how the actual game would behave? For example a random number of money depending on your current upgrade lvl would be added to the "bank". Then there would be a button you would buy an "upgrade" with, and every time you buy this the price for that upgrade would multiply up by a certain number, so your passive income you get every frame would go up. Also this button should be deactivated when you dont' afford it, and be able to detect when you can afford it and then activate for you to trigger. If all those works it should be ready for an idle game I think

    Have you played any idle game like Adventure Capitalist or Cookie Clicker? If not, you should just need about 5 minutes on it to get the full grasp on how they work and what I am talking about

  4. #54
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I didn't get any of those errors mentioned, in latest tests I did,
    but I got those errors prior to (hopefully) fixing things,
    only when subtracting
    and usually when subtracting a bigger number from a lower number (should go to 0, sometimes freezed)
    or when subtracting two almost similar very big numbers (i.e.
    123456789123456789123456789-
    123455789123456789123456789
    (result was correct but failed to reset leading zeroes on the left)

    ...I should have fixed everything now,
    but more testing to be sure is better

    as you say, with that many figures it's a bit awkward to test

    ...the price for that upgrade would multiply up by a certain number...
    for multiplication I give up
    if you need to multiply very big numbers x very big numbers
    this may prove quite difficult to do..

    while comparing two very big values (to see if you can afford) can be surprisingly simple:
    you just need to compare them as strings, that should do the trick

    K,M,B etc can be done - you would like it for every three digits?
    (thousands, thousand thousands, etc.)?
    or flexible maybe (custom n. digits)?

  5. #55
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    About multiplications, I am not sure it is possible to not use that. Or how would the numbers increase for things giving money for example?

    Say for example in Adventure Capitalist. The first thing you buy is the lemonade stand and it gives 1 gold every click. It cost 4 gold to upgrade it. When you upgrade it one time it give 2 gold every click and upgrading again cost 4.28. Next level gives 3 gold and then upgrade cost becomes 4.58. Next 4 gold and upgrade cost 5 gold and upgrade cost 4.90. etc etc etc.

    I am unsure how it would be possible to do anything without multiplications or am I missunderstanding something?

    Hmm I don't know if this page is useful? They talk about Adventure Capitalist and the 32 bit limi and the formula from what I can see?:

    http://adventure-capitalist.wikia.com/wiki/Businesses

    "The highest possible number of Businesses you can own is 2,147,483,647, which is the highest 32-bit integer. Buying one more would subtract your money. However, this is much lower for limits in Unity: up to 5,049 Newspaper Deliveries may be bought before the price reaches infinity on the next one. The maximum price is ~179.769 uncentillion.

    Whenever you buy a building, the cost to buy the next increases by the coefficient listed in the table below. For example, your first Car Wash is $720, but your second is $720*1.14, or $829.92. Buying 10 or 100 buildings at once gives no savings; the cost is just the total cost you'd pay if you clicked the buy button 10 or 100 times. "

  6. #56
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    for multiplications there may or may not be easy workarounds,
    depend on how much flexibility you need

    if you need to multiply by "low" numbers
    (big number * integer < 10~20)
    it can be pretty easy to do
    (or to implement as an additional function)


    but let's take whole figures from your example:
    (since we are dealing with integers, I consider them x100)

    upgrade cost

    400 + 28
    428 + 30
    458 + 32
    490 + ...

    gold x click

    1 +1
    2 +1
    3 +1
    4 + ..

    you can see that increments are very regular,
    if it continues growing this way,
    you can have both increments just with addition obviously


    while if you need to increment in higher figures,
    let's say multiply by 10
    you could easily do that by just adding a 0 to the right of the string...


    some tricks can be done,
    but not the complete flexibility of multiplying by any arbitrary number

    building a multiplication routine would require a lot more looping (about ten times more)
    can't think how to do that without a "per digit" approach
    while the strength of this solution is that it handles 9 digits at time,
    lowering very much process power needed and making it exporter-friendly
    (did you try it on exporters btw?)


    (sorry I just noticed the second half of your message with the link, I'm a bit hurried now, Ill check that later!)

    edit:
    I checked out the link,
    I don't think I got how the system works though, what each column of the table actually means,
    would be probably clear after playing the game
    not sure it strictly needs multiplication... due to what I was suggesting above
    if you can do with multiplying by:
    1 to 20 / 100 / 1000 / 10000... (any power of ten)
    this can be easily and efficiently done
    other figures inbetween would be a pain and possibly problematic for exporters

  7. #57
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Schrodinger: It might work by multiplying just with whole numbers, but do you mean like with 1 2 3 4 5 6 etc?
    About the table in the link, I think it means that for every level the price is increased by the coefficient.

    "Whenever you buy a building, the cost to buy the next increases by the coefficient listed in the table below. For example, your first Car Wash is $720, but your second is $720*1.14, or $829.92."

    If something like this does not work though, I remember someone suggesting some system with "leveled" currencies. Could that work? Say for example the game starts with things costing 1 bronze coin, then after the price reach over 999 bronze coin, it reverts to 1 silver coin, and so on and on. I don't know how you would compare prices across different currencies though? Say for example you have 60 silver coins, and something cost 700 bronze coins etc. Could a system like this continue forever as long as you make new currencies? Maybe you have a base value between 1 and 1000. And then a "currency level value", from say 0 to 10 where 0 is bronze, 1 is silver, 2 is gold etc. I am not sure if anything like this would work?

    There is actually a free flash and mobile idle game called idle tree that uses coins like these:

    http://www.eioira.com/2014/11/idle-tree.html

    List of Coins on Idle Tree
    - Bronze (one, 1)
    - Silver (thousand, k)
    - Gold (million, m)
    - Platinum [cyan] (billion, b)
    - Ruby [red] (trillion, t)
    - Amethyst [purple] (quadrillion, q)
    - Emerald [green] (quintillion, qt)
    - Rose [pink] (sextillion, s)
    - Sapphire [blue] (septillion, sp)
    - Diamond [white] (octillion, o)
    - Onyx [black] (nonillion, n)
    - Rainbow (decillion, dc)
    - Unobtainium [gold-green] (undecillion, u)

    Btw, my math skills are so bad, but is there always a 1000 difference between each of these steps? Like 1000 bronze become 1K, 1000K becomes 1M, 1000M becomes 1B? Or are there bigger jumps at some points with the Septillion etc? Or is 1 of the currency after always 1000 of the previous?

  8. #58
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I was thinking a quick but not very efficient way of multiplying is simply "adding the same number to itself n times"
    so keeping it low could work: multiply by 1 to 10 means adding 0 to 9 times itself to itself
    but I wouldn't apply this approach to bigger numbers, as it would become highly unefficient.

    On the other hand, doing the real multiply math on single figures, could anyway prove very unefficient with very big numbers
    (every remainder you get on a single figure must carry over to other figures, who could propagate additional remainders to other figures and so on, in a long chain of loops)

    So I was thinking that these limited approaches could be used:
    from 1 to 10 - the add to itself pattern could be ok
    for figures above, multiplication by powers of 10 is extremely simple and efficient, as it only means adding a "0" to the right
    (and reloading the new number in the system)
    so you could multiply by, i.e.:
    2,3,8,10,100,1000,10000,100000 etc.
    but not by, i.e.:
    11,15,32,50,76,120,1001 etc.

    and yes, only whole numbers, no floating point values


    The "currencies" thing can surely be done,
    those figures seem to grow by 1000 at time
    we could do something like if you write:

    "40K"

    it adds 40000

    or if you write:

    "13t"

    it adds 13000000000000

    and so on to (theorical) infinity

    with a "set of symbols" (k,m,b,t,q...) you could enter yourself and customize
    (if more than a single character for a single symbol is needed, for efficiency reasons it could be better using also a string tokenizer though)


    If this could be ok for you, I could add these new features next days

  9. #59
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Schodinger:

    The multiplication by the power of 10 sounds to much. That would make prices go up way to quickly?


    If you think this could be done with the currencies instead that would be great!! Not sure what you mean by writing "13t" though?

    Here is a video of the game idle tree that use different currencies like bronze, silver, gold etc

    https://www.youtube.com/watch?v=KJ5z2QXxvg0

  10. #60
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    With "13t" I meant 13 trillions, taken from the example list you posted above
    so that you could write any number + currency and that would add that amount of currency
    (so we are using no multiplications at all in this scenario, right?)

    You would write this string in the same way you currently write 123456789 (any number to add) in the widget add_value string
    the widget would recognize the last digit as currency if different from 0-9
    and add the relative amount of "zeroes" to fit the currency specified

    This can be definitely done and shouldn't be too intensive.

    If you confirm it's ok,
    would be fine having "single-digit" (single symbol) currencies,
    or you would need more than one digit for currencies?
    i.e. in the example above I see "qt", "sp" etc.


    ___ another note ___

    I see a possible issue with the video you posted:
    from the way the widget is currently structured
    it can add only one value per frame
    I'm under the impression all that popping values in the video are added at the same time
    (4bronze + 4bronze + 6bronze etc. all at the same time)

    this would require firing the widget code inside a loop - and so adding potentially harmful "redundancy",
    when too many numbers are added at the same time
    (say adding 20 values would mean fire the "add_subtract" loop 20 times, and for a number with 100 digits, would result in about 400 loops, a bit risky)

    OR

    making a buffer that adds max (n) values per frame,
    but this could slow down the accuracy of your "bank" counter
    waiting a couple instants before it
    (and these instants could "sum up" making for a big lag if the game always continues at this pace, like it seems,
    until your finger is destroyed or your battery exhausted )

    Summarizing:
    if you need to add just a few values at the same time (say 1-5) this could be considered doable
    if more, this could become hazardous for android


    ___ side note ___

    the way that video works is simpler than what we are doing here.
    It apparently doesn't keep track of previous currencies - when you go past a currency it doesn't need to keep track of previous ones (I think?),
    i.e. when you jump silver to gold, it forgets (or anyway doesn't need to keep track of) how many "copper" you have,
    this could be done pretty easily with some specifically tailored solution just switching your currency and resetting your counter
    but I was under the impression you needed to access the number at any level, from lower to highest "currency"?

    And anyway a widget capable of handling very big numbers could be useful for other purposes I guess...

Page 6 of 8 FirstFirst ... 4 5 6 7 8 LastLast

Similar Threads

  1. Group number limit?
    By Pandora in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 28th March 2008, 09:25 PM
  2. limit edit box to number only
    By Anfini in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th December 2007, 07:07 AM
  3. Number of objects limit?
    By Pedro Almeida in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th October 2006, 03:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •