View Single Post
  #7  
Old 11-16-2008, 07:25 PM
Sven Niscadae's Avatar
Sven Niscadae Sven Niscadae is offline
Penguin Pirate
Sven Niscadae's Primary Pirate Info

Join Date: Jun 2008
Location: Working on my Quests
Posts: 959
My Mood: Tired
Sven Niscadae is well renown pirateSven Niscadae is well renown pirateSven Niscadae is well renown pirateSven Niscadae is well renown pirateSven Niscadae is well renown pirateSven Niscadae is well renown pirate
Quote:
Originally Posted by Aliese View Post
Many of the most common requests have been ignored - upping the notoriety cap, money cap, weapon level caps, bigger closets, etc, etc. All of those should just be simple changes in code.
I'm going to chime in on the money cap of 65k from a programming aspect. 65k is a magic number in programming. It seems to me that Disney used an integer data type to define "gold". An integer's upper limit is 65k (actually 65,535). Why did they pick an integer data type is probably because the most expensive thing you can buy in the game is the War Frigate for 60,000 gold.

So why not make the upper limit higher? The next integral data type available is a long integer that has an upper limit of about 4 million (4,294,967,295). Sure you could set the cap somewhere within that variable but there would be some wasted memory. Even if you don't use the maximum, an application reserves the maximum memory the data type allows for the variable (e.g. int = 32 bits, longint = 64 bits). It's a best practice to use the smallest data type per your application's needs.

Even if they decided one day to change the data type of "gold" to a long integer, they would have to go through the code, find every routine that uses "gold", and verify there will not be any sorts of conflicts between the different data types. I don't know how their code is structured but I'm sure the very idea would make them cringe at least just a little bit.

I can understand why they made the gold limit. I can understand some pirates are a bit miffed at gold falling to the bottom of the ocean because they've reached the cap. But even if you had the gold, what are you going to do with it?

Okay. I'm done with my programming theory lesson today.
__________________
Sven Niscadae
Donate : PotCO Wiki : Site Rules