• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Maximum number of units in the map?

Status
Not open for further replies.
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:
It probably depends on your video memory, you know at one point you may get serious slideshow then crash.

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.
 
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.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
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"
 
Status
Not open for further replies.
Top