• 🏆 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!

[General] Give more CPU time to certain player?

Status
Not open for further replies.
Level 10
Joined
Aug 19, 2008
Messages
491
Hey.

I got a problem with my map. There's a computer controlled player that handles all the enemies. The game regulary spawns in units for this player. If my user-controlled players can't kill them fast enough, they can grow quite numerous.

When there are around 100 enemy units on the map, some of them stop moving for a second or two. Around 200 units they start getting stuck behind each other because there are so many units not moving.

IIRC this is because wc3 allocates a certain amount of CPU time per player. One solution is to just let more computer players control the enemy units. A better solution would be to give more CPU time to the existing one.

Is this achievable? Can I tell wc3 to allocate more resources to a certain player?
 
Level 10
Joined
Aug 19, 2008
Messages
491
What if he is doing "1 vs. 1,000,000" in war3 ?
Yeah lol. 300 spartans vs Xerxes' Persian army. Or maybe Custer's Last Stand. Who's this jerk to judge what's good game design or not?

the usual solution is to split it across multiple computer enemies, which is all the more doable now that there's 24 slots
Yeah I figured that was the only solution. The enemy is now controlled by 3 computer players and all units move smoothly.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
IIRC this is because wc3 allocates a certain amount of CPU time per player.
No it is not...
One solution is to just let more computer players control the enemy units.
That is the only solution. One can help reduce the issue by simplifying terrain pathing as well as reducing unit collision size but both of these have gameplay consequences.
A better solution would be to give more CPU time to the existing one.
This does not make any sense. As far as I am aware Warcraft III does not have any kind of scheduling/time management logic.

Warcraft III is written to calculate movement instructions for each player every game frame. Each movement instruction is a vector with a sufficient length so as to allow many units to move fluidly at once. Move instructions last until either the end of the vector is reached, or the unit collides with something like another unit. It is possible it calculates many movement instructions per player per game frame, but it is hard to tell/measure and ultimately the source of the limit is a finite number of movement calculations per player per unit time.

The reason path finding is done this way is likely to place an absolute limit on complexity of the path finder logic while still being fair between players. Games like StarCraft II which have no such limits are well known to perform like garbage when 4,000 units are moving around.

Nothing to do with CPU time slot management. Warcraft III is not an operating system.
 
Last edited:
Status
Not open for further replies.
Top