Forums » General

Cash limit.

12»
Aug 13, 2003 Urza link
I've been playing with my money bug a lot after learning it was already fixed for 3.3, and noticed that cash tops at 4.2 billion, and the website stops recording over 2147483647. Why are the numbers capped? Things like Bounty Bot could get screwed with the bank and the lotto, because with people like me and a1 betting billions of creds, well, that's half of it's max. Then there are people who have bank accounts. If people had 2 bill worth of accounts, no one can add to their account or the lotto.


And what about when people have empires built on smuggaling nontaxed Super Lube to Planet B34V3R ? What happens when they cant make anymore cash?
Aug 13, 2003 Celebrim link
You exploited a bug and now you are complaining that the game doesn't support your bug exploitation?
Aug 13, 2003 alienb1212 link
heh....

"Mommy! I cant get the money out of the ATM fast enough!"
Aug 13, 2003 Renegade ++RIP++ link
Whee I found why it is topped at 4.2 bill.

Actually to be more specific, the cap = 4.294.967.296c

the reason, amounts are stored in 32bitswise numbers, so that makes 2^32.

It is a programming issue :D

like int = 0; I can have a max of 4,3 bill.

And in my opinion, the 2.147.483.647 "+1 for the 0" is because a int has a storagecapacity of 4.3bill places but as well for the negative as the positive as the 0.

So in short: 2147483647(=a) is the maximum positive number, -2147483647(=b) is the maximum negative number. and when you do a - b for getting the range +1 to think about the 0, you will get 4.294.967.296c

Am I right or Am I right

answer : you are wrong

/edit: stop editing my posts :D













PS: little joke from myself, no maliscious intents ;)
Aug 13, 2003 alienb1212 link
STOP H4x0R|nG yourself! you'll end up in jail!!
Aug 13, 2003 BountyBot link
Yes, the cash is sent around as a 32 bit unsigned int, with a range of 0-(2^32-1).

Perhaps the devs could have a 100:1 reverse cash split, with all cash and costs decreasing by a factor of 100. But some of the problems Urza mentioned would still be around. Players _can_ become billionares if they work together. BountyBot requires more of my attention than I'd like because of this limit.

Personally, I'd like the devs to move to using 64 bits for cash. If it's a fantasy game, players should be capable of becoming fantasy trillionares.
Aug 13, 2003 roguelazer link
It's signed and unsigned ints. SF's bug had a thing about it. It's in the archives.
Aug 13, 2003 alienb1212 link
BB, do you lose money because you have too much?
Aug 13, 2003 Renegade ++RIP++ link
pfff,

yes that was what I said, I only forgot to put in the unsigned and signed thingy :D. But if you read the post + and - = signed, the 4.3bill is unsigned :D

/me does the cool dance

/me found the solution first, /me dances some more :D

cheers

PSD: the 64bits arent that the longs ?
Aug 13, 2003 roguelazer link
No, 64 bit is not long. It is 18,446,740,000,000,000,000 which is far longer than a long (it is ~18 quintillion larger than a long)

64 bits would require a 64 bit proc too. Otherwise every money calculation would require two processor cycles, making vendetta effectively twice as slow at dealing with money. 32bit seems the maximum without getting an itanium, sparc, opetron or g5 based server.


CALCULATIONS:

2^64 = 1.844674e19
Aug 13, 2003 Urza link
so anything that is >2^32 can be very very very bad for the game? Like sili reaching 4,294,967,297 from the center of the sector?
Aug 13, 2003 roguelazer link
Correct. Over 32 bits it gets confused. And some things are signed. Therefore they can only be 31 bits (the 32nd bit is to determine positive or negative). I believe the position in sector is signed (for - and + distances from 0,0,0,0). Therefore anything over 31 bits can be dangerous, and anything over 32 bits is guaranteed to go BOOM.
Aug 13, 2003 BountyBot link
1) There don't _appear_ to be any signed/unsigned bugs left. I did some tests a few days ago with values above 2^31. The only issue seems to be the web site pinning at 2^31. Everything in the game seems to work ok.

2) 64 bit ints don't require a 64 bit proc. It's true that on many CPUs, 64 bit int math will take more cycles than 32 bit math, but the % of CPU time vendetta spends doing math for credits is effectively 0. The game is spending most of it's time figuring out how to draw the world around you. A bigger issue with 64 bit cash would be the networking protocol, but the devs already compress the network packets, so the typical 32 extra zero bits will end up smaller than that.

3) BountyBot won't lose any money because of this, but the bank could become effectively "full", disallowing deposits. I can work around this by moving credits to other BountyBot players, but then BountyBot wouldn't be able to handle a "run" on the bank. Either way, no one's credits are in danger because BountyBot only records a transfer as successful if the credits actually move.
Aug 13, 2003 Pyro link
Rogue, that's why we all need to donate! So the devs can get a nice Opteron server! Actually, devs, I can give you guys a Sparc 10 if you want... :P
Aug 13, 2003 roguelazer link
1) I bet there's some around. *whistle* j/k, but I bet ther e are some.

2) The network packets send a fresh packet per transmission I believe. And the extra clock cycle could be noticable in large quantities. Also, I'm not sure how often server gets money transmissions from the user. But using 64 bit ints would definitely be a noticable slowdown.

3) Wouldn't it lose money that would have been deposited? If the bank has 4.28bil and someone deposits 1mil for lotto, that's 5000c that the bank lost because the money could not be deposited. Plus the sector might crash. Which would mean that all money which bountybot had made since the last logout/login session would be lost. Which would hurt. (As you know, money isn't saved except at warpout and logout)
Aug 13, 2003 Sage link
Couldn't this be easily fixed by allowing players to have multiple bank accounts? Not Bountybot accounts but actual bank accounts in banks around the galaxy. Once monetary consequences are introduced for dying it may well become necessary anyway, so we might as well start testing it now, and circumvent a bug while we're at it.
Aug 13, 2003 roguelazer link
We'd need to HAVE multiple banks around the galaxy. Remember, each bank requires near 100% of a computer's attention to run. It's not the kind of thing you can run in the background 24hours a day. Where are YOU going to find 18 dedicated bank computers?
Aug 13, 2003 Pyro link
MIT Swapfest? Ebay? :P
Aug 13, 2003 The Kid link
the distance thing? oh yeah silicon crashed s3 hehehe 2billon something (negative and positive).
Aug 13, 2003 Suicidal Lemming link
You found the bug, i give a solution.
Credits, they come in 1 shape and size.
The american dollar comes in 7 shapes and sizes (1, 2, 5, 10, 20, 50, 100)

Make it so that in a dock there is a tab marked credits where you can withdraw and deposit credits.
Well, thats fine to double the possible money but what if that limit gets hit? Create credit chips, 1 credit, 1000000 credits, and 1000000000 credits.

EQ has somethign similar to this.
10 copper peices = 1 silver peice
10 silver peices = 1 gold peice
10 gold peices = 1 platinum
(i think)