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
    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?

    This is espically true if you watch the tactics video.

    The AI now has a plot. So when you go at them, they say, ahh, I have this many calvary, this many infantry I am going to try and do this formation

    Then if you scatter them they are going to try and reform or try a new formation.


    For formational combat with lines and formations marching, it is rather difficult at 10,000 let alone at 20,000, 30,000, etc.

    I don't know coding but I do know science, a controlled variable is always easier to test then a variety of uncontrolled ones.

  2. #2
    Member Allu X's Avatar
    Join Date
    Feb 2009
    Location
    England, United Kingdom
    Posts
    32

    Default Re: Is there a reason for Hardcoded limits?

    Quote Originally Posted by Polemists View Post
    This is espically true if you watch the tactics video.

    The AI now has a plot. So when you go at them, they say, ahh, I have this many calvary, this many infantry I am going to try and do this formation

    Then if you scatter them they are going to try and reform or try a new formation.


    For formational combat with lines and formations marching, it is rather difficult at 10,000 let alone at 20,000, 30,000, etc.

    I don't know coding but I do know science, a controlled variable is always easier to test then a variety of uncontrolled ones.

    But won't this make the AI become too predictable and scripted?

  3. #3
    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?

    Yes and no.

    If I give Army A 30 different formations depending on 30 different scenarios, with 30 different fall back scenarios. You've got a plethroa of options, plus the AI can constantly switch back and forth.


    In previous TW games the formula was simple. Frontal attack, flank if possible, charge calavary against either weaker units or bull rush your general.

    Now, if you do frontal attack it has maybe 30 or 50 formations to choose from. It can garrison, it can build fortifications, it can also the map. High and low terrain, certain ambush poistions, and slowly the strategies build. Not to mention this is not simple numbers, the AI may see you like to use horse charges in the flank and suddenly mid game switch it's strategy.

    Where you once had one strategy it may now have 5 different options of how to employ that strategy.

    Combine this with the fact that factions are unique and they are going off historical stratgies there could be thousands of options.

    Now if they let 30,000 troops on the board, what strategy can the AI use? Formation loses all meaning at that many numbers as it is merely a brawl. It would have to subcode, by dividing units into groups or armies, and then use those armies in formations. Which the Ai is currently not designed to do.

    The AI is designed to fight a player on the single player campaign, possibly with allies or reinforcements on either side. It is not designed to field 30,000 troops against 10,000 troops.

    Even if a pc could handle it, the AI would become confused and the combat would just be a mess of chaos.
    Last edited by Polemists; 02-15-2009 at 15:16.

  4. #4
    I Still Play Shogun Member ratbarf's Avatar
    Join Date
    Jan 2007
    Location
    Canada Baby!
    Posts
    122

    Default Re: Is there a reason for Hardcoded limits?

    I don't know, with formation AI wouldn't be easier to make the differrent groups work in tandem than if they tried to create one giant formation and then micromanage it? I thought they would have programmed to AI to deal multiple armies and splits of armies at once. I would think several small independant formations within an army would be easier to manage as all they would have to do is support eachother?
    "The man who has no sense of history, is like a man who has no ears or eyes" - Adolf Hitler

    "In the absence of orders, go find something and kill it." - Field Marshal Erwin Rommel

    Interdum feror cupidine partium magnarum Europae vincendarum
    Sometimes I get this urge to conquer large parts of Europe.

  5. #5

    Default Re: Is there a reason for Hardcoded limits?

    Look at Oklahoma when they ran the Wishbone. You knew they would run the Triple Option, but few people could actually stop it.

  6. #6
    Member Member Greyblades's Avatar
    Join Date
    Feb 2009
    Location
    UK
    Posts
    8,408
    Blog Entries
    2

    Default Re: Is there a reason for Hardcoded limits?

    Quote Originally Posted by Flavius Silvanus View Post
    Look at Oklahoma when they ran the Wishbone. You knew they would run the Triple Option, but few people could actually stop it.
    No offense intended but you may want to find a better example. I'm not totaly sure but i doubt that many people here fully understand either the Football lingo or the game you were reffering to.

    Oh and welcome to the board.
    Being better than the worst does not inherently make you good. But being better than the rest lets you brag.


    Quote Originally Posted by Strike For The South View Post
    Don't be scared that you don't freak out. Be scared when you don't care about freaking out
    Spoiler Alert, click show to read: 

  7. #7
    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 from a programming point of view its poor practice when coding not to put in limits.

    Maybe I'm wrong but if I logic it out..

    if you only want to only 4 units then you only need 2 bits worth of space for each unit..

    00 - Unit 1
    01 - Unit 2
    10 - Unit 3
    11 - Unit 4

    You only need 8 bits of storage space.

    If you want to set your limit higher then your adding on more bits. If you not going to use the extra slots you make by adding a bit, then your slowing things down and wasting space for nothing.

    000 - Unit 1
    001 - Unit 2
    010 - Unit 3
    100 - Unit 4
    110 - Empty
    101 - Empty
    111 - Empty
    011 - Empty

    To store the same 4 Units your now needing 12 bits of storage.

    I would imnagine in the actual game each unit required a much larger amount of space so the difference of adding more units, and the consequential bit length would mean a lot larger memory requirement.

    Like I say I'm not 100% sure on this stuff so maybe someone who's into programming will correct me.
    Last edited by Marius Dynamite; 02-15-2009 at 23:24.

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