• 🏆 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] How can I decrease the map load?

Status
Not open for further replies.
Level 7
Joined
Mar 10, 2013
Messages
366
Hi. I'll just get to the point.

I've been working on a map, very, very huge (it's so huge that it only works with WEU with unlimited values, with more than 700 doodads).

It has complex JASS and alot of stuff.
I need to drastically reduce the map size and, more importantly, the map load time (which takes up to 2 and at worst 5 minutes to load).

This maps has everything in Insane amounts, but what should I do first to reduce the map load time? It make it virtually impossible to test it without an optimization, and even with one, it takes a lot of time to load the map either, so I really need to work on it.

EDIT:
I also noticed it has about 170 imported files, which not alot are models totalizing 6,205KB of imported content (roughly 6MB), could that increase the map load time a ton?

Any clue from what point I should start?
 
Last edited:
Level 22
Joined
Feb 6, 2014
Messages
2,466
Object Editor Data are usually the culprit of long loading times (e.g. Abilities with way too many levels). Also, make sure you do not have a long initialization code in your systems, something like:
JASS:
loop
    exitwhen i == JASS_MAX_ARRAY
    set var[i] = i
    set i = i + 1
endloop

Also, depending on the type of your map, only initialize Spells/Heroes that are selected. Don't initialize all Heroes and their Spells at the start. For example (I'm using Melee Heroes as example), only initialize Death Coil script if Death Knight is selected.
 
Level 7
Joined
Mar 10, 2013
Messages
366
Object Editor Data are usually the culprit of long loading times (e.g. Abilities with way too many levels). Also, make sure you do not have a long initialization code in your systems, something like:
JASS:
loop
    exitwhen i == JASS_MAX_ARRAY
    set var[i] = i
    set i = i + 1
endloop

Also, depending on the type of your map, only initialize Spells/Heroes that are selected. Don't initialize all Heroes and their Spells at the start. For example (I'm using Melee Heroes as example), only initialize Death Coil script if Death Knight is selected.

If I change the load inization code (map initilization) to 0.1 time elapsed, it would load everything in game, right?

This tool was created mainly to decrease loading time Widgetizer 1.3.0.9 ; it recommends not to create object abilities with morge than 4 levels.
(make a backup)

So, if I have for instance, the plus stats ability with 600+ levels, would it make the game slow?

Also, another problem is that the has has like 300 units already placed. How can I overcome this? Is it ok to changed everything with preplaced regions that I destroy after placing the units (which would happen in 0.1 game time?)
 
Level 11
Joined
Jun 2, 2004
Messages
849
If I change the load inization code (map initilization) to 0.1 time elapsed, it would load everything in game, right?
This is true, but it's arguably worse; would you rather a longer loading screen, or a huge lag spike at the start of the map?

A 600 level ability will definitely add loading time. Some abilities are stackable (mostly ones based of items); would that be a viable alternative?

IIRC preplaced units add loading overhead too, though other options (like spawning them with triggers) are even slower AFAIK.
 
Level 7
Joined
Mar 10, 2013
Messages
366
This is true, but it's arguably worse; would you rather a longer loading screen, or a huge lag spike at the start of the map?

A 600 level ability will definitely add loading time. Some abilities are stackable (mostly ones based of items); would that be a viable alternative?

IIRC preplaced units add loading overhead too, though other options (like spawning them with triggers) are even slower AFAIK.
I do probably want the best o both worlds. The map already have a big cinematic at the start. I can probably spread the loading of stuff in this cinematic.

Also, the stats ability I will probably change to another system, but that's a possibility too (if I want to keep the + value in the hero stat, but I'm not sure if I want to keep that).
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
If I change the load inization code (map initilization) to 0.1 time elapsed, it would load everything in game, right?
Yes but you would not want that. What I mean was optimizing init scripts (avoid long loops in your init) and only initializing those that are really needed to be initialized.
So, if I have for instance, the plus stats ability with 600+ levels, would it make the game slow?
That would definitely make the game load slower. Why do you have 600+ levels? If it's for stat bonuses, use a smarter approach like the one used here.
 
Level 7
Joined
Mar 10, 2013
Messages
366
Yes but you would not want that. What I mean was optimizing init scripts (avoid long loops in your init) and only initializing those that are really needed to be initialized.

That would definitely make the game load slower. Why do you have 600+ levels? If it's for stat bonuses, use a smarter approach like the one used here.
Well, not everything needs to load instantly, that's why it have a cinematic at the start of the game.

Also, just to explain. This map is a RPG that I used to play, but the old developer stopped working on the project and released the unprotected version.
It was a RPG loved to play, but it had a lot of flaws I'm working on it. And this is one of then... The map has alot of Object Data that is not used (it's possible to be used, but players don't even use it, has no purpose whatsoever). And yes, I agree with you, and I'm going to change that system, to a better one (btw, thanks for suggesting one).
 
Last edited:
Status
Not open for further replies.
Top