What makes wc3 graphically so heavy?

Status
Not open for further replies.

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
I'm wondering why warcraft 3 is so heavy graphically whereas it's sucks? I can play CoD 4 in fullest resolution and it's not lagged at all. But now I'm making a map with 3D person camera:
37177d1220270884-create-simplest-3rd-person-camera-arthas.jpg

It's badly lagged. The fps drops to ~15-20s. At first it was okay before I added some decorations, the fps was around ~30-35s. Now after I added some decorations, literally some, it starts to drop badly.

I'm not asking how to deal with this issue, but I'm just wondering, how come a badass graphic like cod 4 can performs better than wc3? What are the differences?
 
Level 25
Joined
May 11, 2007
Messages
4,650
Because it's not made to be played in a third person view. It renders everything that is in it's view, even objects that are behind other objects.

Cod aswell as mostly all FPS games doesn't render everything in view, Half-Life 2 for example uses "Visportals" where it divides a map into blocks, where when you're inside a block you can only see the objects that are inside that block, Call of Duty probably uses a different way + they use LODS, objects that are less detailed the further away they are from the camera.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
The main reason is because it's running on an old -compared to current ones- inefficient engine that was built on the constraints of 15 years ago.
There are various bottlenecks where it does not really matter how good your PC is or how good it can play CoD x.

There are still things you can do however to increase fps in your map by a lot. If you want, post a thread with your map attached and we will have a look at it.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
From my experience, it is because of the terrain mesh which has significant impact on the framerate for some reason. (maybe because it has no mip mapping at all ? Dunno.
The more of it you see (such as in third person) the worse the framerage gets.
You can actually get rid of the terrain, but then you will need a replacement.
 
Level 4
Joined
Apr 14, 2014
Messages
98
Thanks for the informations guys. I ve been working around my map and it's able to reach ~35-40 fps in normal condition now. :grin:

@Firework:
Type "/fps" in game and the fps info will be appeared at the middle of your screen.

Neat info. What did you end up doing to drop the FPS?
 
Old engine. Also, things like weather eat a lot of performance.

Because it's not made to be played in a third person view. It renders everything that is in it's view, even objects that are behind other objects.

It only renders up to the FarZ value, though. In fact, if you're using a 3rd person camera, modifying the FarZ value will probably have the largest impact on FPS out of all settings (this is true even for WoW).

-----

You can make quite a few optimizations for your map, but it all depends on smart planning. For example, if you have a single player map, you can save quite a bit just by hiding and showing things only when needed (this is true for multiplayer as well, but it is a bit less trivial for multiplayer). Keep in mind that Warcraft operates on a large scale, and things happening in your map will affect performance. For example, if two units are fighting, warcraft 3 will have to invest performance in that fight--even if it is not visible. I see a lot of maps that will try to have units perpetually fighting in the background, and they just keep restoring health until they are engaged. If you really consider how wc3 runs, you can see why this is wasteful.

As for something to increase your own fps, you can disable the frame buffer lock in the registry (Windows only), and some ppl have reported it to increase fps a decent amount:
http://dotautilities-forums.net/Thread-Warcraft-3-Increase-your-DotA-FPS-by-10-frames-per-second
But you might open yourself up to issues such as screen tearing.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,284
WC3 uses Direct3D 8. The APIs were still in early days of development so were not very performance optimized. The API used probably cannot fully utilize GPU resources due to restrictions placed by the API that are no longer relevant to GPUs. Starting with DirectX10 the API for Direct3D 10 was greatly optimized and aimed at allowing better utilization and higher performance. DirectX 12 will take that to the next level as you may well have read in gaming news sites.

It addition to limiting what resources of modern GPUs can be used, the API also is responsible for driver overhead. Much of your CPU time is spent inside the graphic vendor driver stack processing the API calls. More modern APIs like in DirectX10 and especially DirectX12 allow for the driver stack to perform more efficiently so use less CPU time. Less CPU time spent in the driver stack means more GPU utilization when the CPU is very busy.

Warcraft III was also built targeting single core processors and so only uses 1 heavy weight thread. More modern games like StarCraft II use 2 or more threads. This allows for more CPU utilization and so gives more time for the driver stack when under load (so the GPU can be better utilized). The biggest improvement to performance is separate threads for game state and graphics since now you can always have driver calls running at the same time as advancing the game state. Recently driver stack overhead has become a big problem and bottleneck to GPU utilization as with current APIs (DirectX11) it is near impossible to keep the GPU constantly busy in a meaningful way. DirectX12 is designed to specifically fix that problem and allow the CPU to effortlessly keep GPUs (even multiple) busy all the time.

WC3 was designed as an RTS game. The particular view angle you describe as having poor performance is the infamous view angle that has plagued developers with bad performance from the very beginning of 3D video games. Games like The Elder Scrolls: Oblivion (the best example for this as it is easy to spot) managed to obtain good performance with such views using a variety of trickery. The most common is that only the area directly nearby (and especially in-front) is loaded with the rest remaining unloaded. Then LoD (forget what it is short for) is used in place of other cells which basically is a simplified version of what the cell contained. For example a detailed ruined wall would only be loaded near the player while the same wall far away might be a low quality model or even not loaded at all. WC3 lacks any such techniques forcing full complexity geometry all the time which can easily result in views where possibly millions of polygons are processed every frame.

WC3 also might not take advantage of geometry ordering techniques so could be generating the same pixel data for every polygon it intersects with. The infamous Z cull problem where the best solution is to render the closest objects first to allow the Z test to not render all geometry behind. The results look identical (since both use Z buffer to order correctly) but with Z cull it is possible to generate the same scene at the same rate with a fraction of the fill rate. It is pretty much required for views such as what you want as they are prone to pixels intersecting with lots of geometry. RTS games generally do not need it since the number of geometry intersections is considerably lower and it is sufficient to assume the terrain is always behind the units which is why there is a good chance WC3 does not support it.
 
WC3 uses Direct3D 8. The APIs were still in early days of development so were not very performance optimized. The API used probably cannot fully utilize GPU resources due to restrictions placed by the API that are no longer relevant to GPUs. Starting with DirectX10 the API for Direct3D 10 was greatly optimized and aimed at allowing better utilization and higher performance. DirectX 12 will take that to the next level as you may well have read in gaming news sites.

It addition to limiting what resources of modern GPUs can be used, the API also is responsible for driver overhead. Much of your CPU time is spent inside the graphic vendor driver stack processing the API calls. More modern APIs like in DirectX10 and especially DirectX12 allow for the driver stack to perform more efficiently so use less CPU time. Less CPU time spent in the driver stack means more GPU utilization when the CPU is very busy.

Warcraft III was also built targeting single core processors and so only uses 1 heavy weight thread. More modern games like StarCraft II use 2 or more threads. This allows for more CPU utilization and so gives more time for the driver stack when under load (so the GPU can be better utilized). The biggest improvement to performance is separate threads for game state and graphics since now you can always have driver calls running at the same time as advancing the game state. Recently driver stack overhead has become a big problem and bottleneck to GPU utilization as with current APIs (DirectX11) it is near impossible to keep the GPU constantly busy in a meaningful way. DirectX12 is designed to specifically fix that problem and allow the CPU to effortlessly keep GPUs (even multiple) busy all the time.

WC3 was designed as an RTS game. The particular view angle you describe as having poor performance is the infamous view angle that has plagued developers with bad performance from the very beginning of 3D video games. Games like The Elder Scrolls: Oblivion (the best example for this as it is easy to spot) managed to obtain good performance with such views using a variety of trickery. The most common is that only the area directly nearby (and especially in-front) is loaded with the rest remaining unloaded. Then LoD (forget what it is short for) is used in place of other cells which basically is a simplified version of what the cell contained. For example a detailed ruined wall would only be loaded near the player while the same wall far away might be a low quality model or even not loaded at all. WC3 lacks any such techniques forcing full complexity geometry all the time which can easily result in views where possibly millions of polygons are processed every frame.

WC3 also might not take advantage of geometry ordering techniques so could be generating the same pixel data for every polygon it intersects with. The infamous Z cull problem where the best solution is to render the closest objects first to allow the Z test to not render all geometry behind. The results look identical (since both use Z buffer to order correctly) but with Z cull it is possible to generate the same scene at the same rate with a fraction of the fill rate. It is pretty much required for views such as what you want as they are prone to pixels intersecting with lots of geometry. RTS games generally do not need it since the number of geometry intersections is considerably lower and it is sufficient to assume the terrain is always behind the units which is why there is a good chance WC3 does not support it.
This is all cool and fine and thanks for the detailed summary of GPU and DX history (in fact, I learned something new, so kudos given), but just look at his screenshot. It is absolutely 100% without a doubt clear that this is not a game engine problem. Even with GPU-forced AA at max settings there is no way in hell that scene could ever cause an FPS drop on any machine built in the last decade.

It's in his triggers. Period.
 

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
@DSG:
Thanks for the detailed explanation ^^

This is all cool and fine and thanks for the detailed summary of GPU and DX history (in fact, I learned something new, so kudos given), but just look at his screenshot. It is absolutely 100% without a doubt clear that this is not a game engine problem. Even with GPU-forced AA at max settings there is no way in hell that scene could ever cause an FPS drop on any machine built in the last decade.

It's in his triggers. Period.
Well, my machine is not very good maybe that's why. The trigger is quite heavy alright, but it only costs 2 FPS for every playing player. Without the main triggers being enabled, the FPS drops to ~40s already. And pnf is correct, far z playing an important role to save more fps in 3d person camera mode here.

@everybody:
Thanks for the response as well ^^


Actually, I'm just mind blown. How on earth games with stunning graphic such as sharpcraft and CoD Black Ops can perform better in my machine more than warcraft 3 in 3D person camera mode? lol
 
DSG said:
WC3 was designed as an RTS game. The particular view angle you describe as having poor performance is the infamous view angle that has plagued developers with bad performance from the very beginning of 3D video games. Games like The Elder Scrolls: Oblivion (the best example for this as it is easy to spot) managed to obtain good performance with such views using a variety of trickery. The most common is that only the area directly nearby (and especially in-front) is loaded with the rest remaining unloaded. Then LoD (forget what it is short for) is used in place of other cells which basically is a simplified version of what the cell contained. For example a detailed ruined wall would only be loaded near the player while the same wall far away might be a low quality model or even not loaded at all. WC3 lacks any such techniques forcing full complexity geometry all the time which can easily result in views where possibly millions of polygons are processed every frame.

LoD = Level of Detail

This is particularly noticeable in large area battlefield type maps. BF2 and Warhawk come to mind.

dalvengyr said:
Actually, I'm just mind blown. How on earth games with stunning graphic such as sharpcraft and CoD Black Ops can perform better in my machine more than warcraft 3 in 3D person camera mode? lol

To summarize what DSG said:

* Old engine is not optimized for the scene: It is rendering every poly in full detail (probably even ones outside the frustum)
* Old graphics drivers are not optimized for the engine: much of the work is being done by CPU when it could be done by GPU with newer drivers. A lot of context switching occurs, and bottlenecks between CPU and GPU are overwhelmed

If you set far-z to 1000, you'll probably see your FPS jump to 60 ;)
 
Level 2
Joined
Mar 15, 2015
Messages
8
@Dalvengyr
Just type it in every map?
Amazing,I should not know this dark techonology though I have played WAR3 for more than 10 years!!

Got it.Thanks...........
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,284
Well, my machine is not very good maybe that's why. The trigger is quite heavy alright, but it only costs 2 FPS for every playing player. Without the main triggers being enabled, the FPS drops to ~40s already. And pnf is correct, far z playing an important role to save more fps in 3d person camera mode here.
One cannot say it "costs 2 FPS" because that is not a suitable measure of performance due to FPS being inversely proportional with load per frame. To drop from 2 FPS to 1 FPS you need to double (100% more) the work per frame but to drop from 101 FPS to 100 FPS you need to do just 1% more work per frame.

In WC3 the biggest loss of FPS comes from advancing the game state. Since the game tries to maintain a constant rate of state advancement (game speed) it will prioritize CPU time on that rather than inside the driver stack rendering frames. It will throttle rendering back to as little as 1FPS (not sure, just that it does force some minimum limit with regards to game time) before allowing the game state to advance slower. After that it will no longer be running in real time so the player might be the subject of a "waiting for player" dialog.

When it drops frames it frees up the time spent in the graphics driver and making such calls. This time is probably quite insignificant on modern processors which is why frame rates generally decrease very fast towards unplayable once performance becomes a problem.

SC2 gets around all this by dynamically slowing down the advancement of game state to more manageable levels so all clients can cope.
 
Status
Not open for further replies.
Top