1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Maximum number of units in the map?

Discussion in 'StarCraft II Modding' started by BlueBerryWizard, Mar 3, 2012.

  1. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1
    What is the maximum number of units one can possibly have in a map?

    My unit attributes array is sized 8193 but it seems to me the map stops spawning new units way before that number is reached.

    I could reduce the amount of memory for my arrays if I know the maximum...

    Edit: According to this thread http://us.battle.net/sc2/en/forum/topic/2913212728 the limit is at 4096 however there is some uncertainty in regards to how many units you can have that don't have commands. It seems 4096 is how many units you can have in the map which have commands.
     
    Last edited: Mar 3, 2012
  2. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    It probably depends on your video memory, you know at one point you may get serious slideshow then crash.
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,996
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    The game will be unplayable long before 8000 units if the units are actually being used to do something.
     
  4. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1

    I have a really good graphics card and what happens for me is they just stop spawning at some point when you try to make new units; I'm not sure what this point is though and it seems to be influenced also by whether or not the units have orders given to them and if they're a doodad or building or not... yet I'm not sure.

    I think when you have lots of units moving around the map you can't spawn as many before it stops making new units whereas if they're just standing around you can make more. I wish I knew exactly what causes this and what would be a good number of units for my wave spawn system to limit itself to and how I should change the spawning when the number of units in the map are really high.

    I think that maybe I can simulate having more units if I just use some units which search for the enemy then deploy themselves nearby and more units appear just out of sight at the spot they deployed at. Like I have all my units spawn at the map edges but I could have ones the create hatcheries, drop off points, tunnels, or whatever that units come out of to have more enemies close to the players units without having as many all around the map.
     
  5. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,996
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    The fact is that moving 1000 zerglings in a group will make the game unplayable on most if not all systems. A limit of 8000 is more than the number of units one can practicly use.
     
  6. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I just did a test; with a crap ton of Zerglings (as many as possible) spawned and moving around I was still able to spawn units which have no orders like buildings or in this case I used my dummy unit.

    Edit: I still should keep a big array for the indexer and for all projectile related stuff as I can have tons of those on the map with no problems resulting.
     
  7. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    This has been discussed somewhere before about towers, i dont remember where.

    The physical max is 4096 (2^13?) but, unit with morph abilities count for an extra unit for each morph. So, you could spawn 2048 zerglings because they morph into burrowed and you can spawn 409 larva because they morph into 9 units, etc.

    after you reach that space the game, when producing the unit, will say something like "Making Unit Failed"