Results 1 to 25 of 25

Thread: Is there a reason for Hardcoded limits?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Undercover Lurker Member Mailman653's Avatar
    Join Date
    Nov 2006
    Location
    Mansfield, TX
    Posts
    1,309

    Default Re: Is there a reason for Hardcoded limits?

    Quote Originally Posted by Polemists View Post
    I think your right, i mean empire is already 15 gig, i'd rather not see it jump to 30.

    I bet the TW game that comes out in 2049 will take up about 500GB.

  2. #2
    Senior Member Senior Member Ibn-Khaldun's Avatar
    Join Date
    Aug 2007
    Location
    Estonia
    Posts
    5,489
    Blog Entries
    4

    Default Re: Is there a reason for Hardcoded limits?

    Quote Originally Posted by Mailman653 View Post
    I bet the TW game that comes out in 2049 will take up about 500GB.
    I hope that NASA will allow me to use it's super-computer to play it then!
    Last edited by Ibn-Khaldun; 02-16-2009 at 09:11.

  3. #3
    Member Member Marius Dynamite's Avatar
    Join Date
    Aug 2006
    Location
    Glasgow, Scotland
    Posts
    258

    Default Re: Is there a reason for Hardcoded limits?

    I think your right, i mean empire is already 15 gig, i'd rather not see it jump to 30.
    and think of the RAM requirement!

  4. #4

    Default Re: Is there a reason for Hardcoded limits?

    I've always figured there was a good reason for them. But when they went from twenty-one to thirty-one factions, I wish they could have put both unit and province limits up by about a hundred. It would have helped modders a great deal.
    “He that is slow to anger is better than the mighty; and he that ruleth his spirit than he that taketh a city.”-Proverbs 16:32


    Read my Aedui AAR-"Across the Waters: A Story of the Migration"
    And the sequel "Sword of Albion"

  5. #5

    Default Re: Is there a reason for Hardcoded limits?

    Yes, there is a reason for hardcoded limit. No, there is no TECHNICAL reason to have 100 regions, or 16 factions, or 500 units. It is marketing.
    Technically, Marius Dynamite, you are right, but about 20 years too late :) The modern 32 bit CPUs process 4 bytes at a time, so they work with integers from 0 to 2^32-1. That is more than 4 biillion. It does not matter if you do basic operations with a number like 500 or 500,000, as long as the result is less than 2^32-1, it takes the same time. So here is a TECHNICAL limit, that makes sense to hardcode to. The memory bus is 32 bits wide, the chipsets buffers are 32 bits wide and so on.
    On the other hand, 100 regions are allowed in the first game so they can sell you an addon, and then another addon, that are raising the limits to 150, and finally 200.
    Let's say that the average computer is speed limited to a map with 200 regions. Why not making 200 regions available from the beginning, even if the game ships with a 100 regions map? Marketing. Why not hardcoding the number of regions at 1,024 and let the modders care about how many regions they want displayed and the users about their hardware? Marketing. Don't get me started on the number of units.
    15 GB? That's all graphics, maps etc. The actual compiled code cannot be more than a few MBs, maybe less than 20, if you strip the libraries etc.

  6. #6

    Default Re: Is there a reason for Hardcoded limits?

    If CA wanted to they could make a game without 'such limits' (that is: without limits you are going to bump into, I mean a limit of 2^30 units isn't going to be noticed too soon). Issue is: what benefits do hardcoded, arbitrary limits bring to you?
    1. You could implement bitmasks in the room you leave out. Those bitmasks can encode additional data, meaning you may use less resources to (until the limit is hit) the same effect.
    2. You can make more assumptions, for instance if you implement a lookup table (hashtable) the more you know about the 'domain' of the input (what goes in, how varied the input is etc.) the better you can fine tune your indexing/hashing functions. This can give you a very large performance boost because you can avoid additional complexity (less to compute means less time required). In the Real-Time components of the game this may be worth more than the loss of (theoretical) content.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  7. #7

    Default Re: Is there a reason for Hardcoded limits?

    Tellos, I have to start saying that my experience with software is based on business software, not PC games :) and from what I've seen, in most projects speed optimization is unfortunately being done either if the project is on time or the code is so bad that the performance is unacceptable by the customer.
    The benefits of hardcoded limits are as you say. But with the limits for units, regions being so low as they are now, even increasing them 10 fold would not put any additional strain on the PC. As I said before, general CPUs do 32 bits processing at once. I think that is more than enough to have bitmasks for units, for example. You can have a mask on 2 bytes, unit type for example, and that still leaves 2 bytes for 65K units. Same for regions, 2 bytes should be enough to encode the geography of region, number of neighbours, recruitement type and so on and still leave plenty of space to encode 10,000 regions.
    As such, they can use any structures they want, hash tables, array indexes or whatever, the key here is that in my opinion no hardware limit prevents expanding, for example, the number of units to at least the above 65K.
    I can only see one drawback for such numbers for regions and units: loading times, if a modder decides to use all of them at once.
    I love EB, thank you for the best mod I ever played!

  8. #8
    Member Member Polemists's Avatar
    Join Date
    Sep 2006
    Location
    In the Lou
    Posts
    1,213

    Default Re: Is there a reason for Hardcoded limits?

    I am not a dev, or even someone who knows code. I do however see the marketing side of it. Not just the simple, they don't want to do it all side, but the side of it would not equal the other areas.

    CA/Sega whoever puts a variety of unique items into the factions they do use, extra research, individual artisits, sound actors, etc, etc. The video game industry is no longer just 8 programmers in a basement.

    Considering what we had before they have done a ton. The fact NO rebel province is just a grey "rebel" anymore is astonishing and honestly something I never thought they could do. The fact we are getting a extra area of the world is impressive. Yet they do have limits, what can, be added, will be added etc.

    CA added as much quality and material as they thought justified the cost/ expense/ and release date window for the product. I am happy with the results and the modders will unlock the rest.

    In the end CA knows what they are doing with factions, I trust them this far, TW games have always had a limited number of factions, I don't see it suddenly changing to a 1000.

  9. #9
    Member Member Daevyll's Avatar
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    277

    Default Re: Is there a reason for Hardcoded limits?

    Quote Originally Posted by Mailman653 View Post
    I bet the TW game that comes out in 2049 will take up about 500GB.
    I expect it to be much, much more.
    According to Moore's law of exponential growth, in 40 years time computing capacity would have doubled 20 times over.
    If we take storage requirement to 'only' require half that amount of growth in keeping pace with computing capacity, we're still talking about 15360 GB of storage.

  10. #10
    Member Member Polemists's Avatar
    Join Date
    Sep 2006
    Location
    In the Lou
    Posts
    1,213

    Default Re: Is there a reason for Hardcoded limits?

    15360 GB of storage....

    wow........i'm really going to have to upgrade then...

  11. #11

    Default Re: Is there a reason for Hardcoded limits?

    We have confirmation that there in hard coded limits for unit size.

    Spoiler Alert, click show to read: 

  12. #12
    The Abominable Senior Member Hexxagon Champion Monk's Avatar
    Join Date
    Jan 2003
    Location
    YU-ESS-AY
    Posts
    6,666

    Default Re: Is there a reason for Hardcoded limits?

    That is the coolest thing i've EVER SEEN.

  13. #13
    Member Member Smeel's Avatar
    Join Date
    Feb 2008
    Location
    Sweden
    Posts
    56

    Default Re: Is there a reason for Hardcoded limits?

    Repeat after me: real-sized armies

  14. #14
    kwait nait Member Monsieur Alphonse's Avatar
    Join Date
    May 2007
    Location
    Groningen
    Posts
    928

    Default Re: Is there a reason for Hardcoded limits?

    Scroll down to post number 117 and you will see: http://www.twcenter.net/forums/showt...=227327&page=6

    I hope this is in the game possible aswell. I have to buy a Cray
    Tosa Inu

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO