Information needed about polygons

Baltazhar

Active Member
Reaction score
55
I am currently making a map that requires up to 600 units at once. Most games would be around 400 though, but there is a possibility for the host to choose additional creeps.
Anyway, there are several complaints from ours trusty beta testers, about lag. So, I've digged a little around to find 'the' perfect way to reduce this. A quick test of the Frames Per Second ingame would show 65 to begin with, and it would slowly fall to around 18 FPS at the end of the game, on a 3Ghz/4GbRAM/1GbGFXcard comp. A game lasts around 15-20 minutes.

So far I've quickly looked through my triggers (around 100 of them so far), and checked for leaks. I can't rule out that there are one here and there, but the allover picture is leak free.

Then, someone suggested to look at the models used. Currently we use the Gnoll and Kobold model (max is 300 of each).
As a test we replaced them with penguins and seals (critters), and the lag improved a lot, so this led the thought onto modelling and polygons. I have removed all unneeded animations from the Gnoll and Kobold unit, and imported them into the map, to try to prevent the massive unit count from lagging.

So, my questions are the following:

1: Are the critter models running more smoothly because they are lowpoly, as where the e.g. Gnolls are higher poly?
2: What should the poly count be on the Gnolls/Kobolds if this map were to run on e.g. 2Ghz, 1GbRAM, 256MbGFXcard?
3: What is the poly count on the Gnoll/Kobold units per default? - Just if anyone knows, or know how I can find it.
4: Does the above description with decreasing FPS fit an explanation where the polycount is the crook?

I have absolutely no idea about what modelling really is. Searched and read a few topics and tutorials, but it didn't give me a concrete response.

Thanks in advance,
Baltazhar
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
I can swear it has nothing to do with it. Sure a big model is laggier than a tiny one (for example it's not the same having scaled to 1.00 model and a 10.00 one), but the massive use of units causes lag. Why do you need so many units in the map anyway?
 

Baltazhar

Active Member
Reaction score
55
The map revolves around a killing contest, so a fair amount of units are required for AoE spells to have some impact.

Increasing the units scaling value from 1.00 to 10.00 wont increase the polygon count, and won't make the game lag more on that account.
It has something to do with the complexity of the model, seeing as e.g. 400 critters lag less than 400 gnolls, or would you disagree?

Could you be more thorough? Instead of just saying that polygons have nothing to do with it, then please explain why.

Thanks for answering though :)

EDIT: The scaling value of the units range from 1.00 to 1.25 on all units.
 

Marsmallos

Member
Reaction score
17
It has something to do with the complexity of the model, seeing as e.g. 400 critters lag less than 400 gnolls, or would you disagree?

Could you be more thorough? Instead of just saying that polygons have nothing to do with it, then please explain why.

I can -almost- guarantee that it is because of the polygon count. The critter models are less detailed, less polygons and lower resolution textures. Have you tried running your map with Model Detail settings on minimum?

On highest graphic settings many models gain a lot of complexity, mainly around the head of the unit, that is to say the part that is visible in the unit portrait. With model detail on highest the head (for example on a ghoul) is as complex and detailed as it is in the units portrait.

The warcraft 3 graphics engine was built to handle a certain maximum number of polygons and units, but after that number (no idea what it is) it performs much worse.
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
from memory, another thing to consider aside from the graphic intensity of the game is the fact that once you get over a certain amount of units (possibly 300 or so) the units tend to lag on their orders, taking forever to perform a simple task such as move. You may have noticed this in game before where troops can be ordered to a point and they will move a little, stop, move a little, stop and then keep repeating til they reach that point. I feel this could be your problem...
 

Baltazhar

Active Member
Reaction score
55
Thanks for the great responses!

Marsmallos: Texture, that was the word I was looking for earlier (didn't mention it though).
Think my next step will be to try to find a modelling for beginners guide, to check if there is some human way of lowering the polygons on the models, and also if the guide should describe someway to lower the resolution and details of the textures.

MurderMode: The units are given a "attack-move to random point" order every 10 seconds. It doesn't look like they stop and 'think' while moving around, so I don't think that's a problem. I've seen the problem before in random TDs and such, where the summoned units cluster up, stop, wait and what not, before they move a bit further.
Anyway, it's not really important if they reach their target, as long as they move a bit here and there, to look lively.

Anyone have a quick link to a beginners modelling guide? What it should explain is basically to make a model as crappy looking as possible, while using the least amount of resources.
For instance, I saw this on TheHiveWorkshop - Uber Low Poly Footman and I know he really isn't a pretty sight, but something like that would be great. There will be a lot of them, so noone will notice the details of them, just the mass as a whole.

- Baltazhar
 

Viikuna

No Marlo no game.
Reaction score
265
I think there is some max amount of polygons wc3 can handle after this amount models start to bug, some effects and polygons wont show or something like that.

Anyways, it is a bad idea to have too many units.
Too many Polygons and wc3s pathfinding systems laggs a lot when you have lots of units.

EDIT. If your fps is dropping that baddly you are probably leaking a lot of handles, some leaks can be hard to notice if you use GUI.
 

Tamisrah

Active Member
Reaction score
16
My suggestions is creating the units at runtime. If its a kill contest then just create enough that your aoe spells are efficient and create more the instant some die. So you'll have less units on the map but have to kill the same amount.
 

Baltazhar

Active Member
Reaction score
55
Viikuna: As I said, I haven't experienced any pathfinding issues so far. I do however, not trust those polygons, and nomatter what other precausion there will be, should be decreased as much as possible.

I'm not that much of a geek, although I do my very best. Open handles, I need a minor explanation here. Is that a kind of leak? Like making points that do not get removed etc. Are that categorized as open handles?

Tamisrah: Actually thought about that, and thought that having less units at once would ruin the illusion of how much outnumbered you really are. Think I will try implementing a counter that keeps tracks of how many units there are in one area, and only let a part of that display. Like having an account, as seen in many maps.
Seeing as part of the game is to avoid being trapped by the hordes of creeps, I would let 100-150 units be actually in each area, and let the rest be a variable number.

I've just downloaded War3 Model Editor v1.05 and man is this confusing. Don't think I'll be able to learn how to model just yet. But I know a few people that could help me out with this part of the lag-reducing.

The map I'm working on is called Winterspring Wargames, currently being beta tested on Northrend. We are trying to make a 'pro' map that people like playing if they have like 15 minutes to spend or so.
You can see our in-progress forum here: http://winterspring-wargames.tk
 

Tamisrah

Active Member
Reaction score
16
Offtopic: Would your mind uploading you map somewhere else than on your forum? I ask because I don't want to create an account on that forum just for trying your map.
 

Viikuna

No Marlo no game.
Reaction score
265
Like making points that do not get removed etc. Are that categorized as open handles?

Not removing a location leaks one handle, but it is pretty simple to remove with customscript.

Its harder to notice some leaks. For example: GUI action Wait ( Game-Time ), uses timer, which never gets nulled. There might be some more of them too, but Im not sure, because I havent used GUI for a long time.

When using GUI, you dont really know when you create handles, so it is easy to miss some of them. However, you need to leak a lot of handles before your games starts to lagg, so it is usually some trigger which runs every 0.03 seconds or something like that.

Anyways, 600 units is way too much, wc3 just isnt build to suport that many units. There isnt too many units in melee games, and Blizzard doesnt even make 6v6 ladder games in bnet.

EDIT. Have you ever played Rabbits vs Sheep? It is a great game, but there is a noticeable lagg difference if you are playing with max of 300 animals, instead of 150.
 

Baltazhar

Active Member
Reaction score
55
Actually the map is a Rabbit vs Sheep inspired game.
Gate[C]aster that made RvS, doesn't really update it anymore, so we thought we'd make a better version with new features etc, but keep the charms.
As far as I know, RvS has a 200 limit at least, and that doesn't lag. So that's why we thought of the poly of the units. We probably have a lot more triggers due to the custom abilties etc...

The last released Beta is pretty outdated compared to all the changes we are making at the moment for the next release.
Think I uploaded the map in the post...

I know that points leak, unit groups and probably a lot of other stuff. Most of it is not removable in GUI, so I've used "call RemoveLocation (udg_TempPoint)" and "call DestroyGroup (udg_TempGroup)" to remove my locations and groups.
I think I have a lot of unremoved arrays, not sure what the parameter for those are. "call DestroyGroup (udg_TempGroup) [1]" would this work for instance?

Speaking of variables and leaks, would it be advised to make individual variables for each ability trigger? Right now I use Temp_Point and Temp_Group for like 80% of the triggers, but never any triggers with wait functions to avoid problems. Seeing as 2 triggers never run at the same time (unless they contain a wait), that's not a problem, right?

If you guys would be willing to help with the map - ofcourse with ingame credits and such, that would be appreciated. We have loads of betatesters, but I'm the only one that knows coding, and that's all GUI except for the few removing custom scripts.

- Baltazhar

EDIT: Map was too big for uploading it here, so I put it elsewhere. Here's the link:
http://www.yourfilehost.com/media.php?cat=other&file=Winterspring_Wargames_0.64_BETA.w3x
 

CaptDeath

New Member
Reaction score
103
srry i have not read all the post but many[and i] will say 300+units moving simultainiously will cause lag there is a system for mass unit moving in the tuts/resosruce section
 

Baltazhar

Active Member
Reaction score
55
Oh thanks CaptDeath, that's great advice.
Don't think moving the units is the big problem, I think having them causes the lag...
 

Baltazhar

Active Member
Reaction score
55
Don't think anyone will reply further, so thanks for your help. I will try to see what I can dig up all around the internet.

- Baltazhar
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top