Help on loading time

hellmonja27

Member
Reaction score
16
hello. i have a map, it's an AoS-- well ok it's a DotA replica. it's called LotP, some of you might have come across it. i know you guys hate DotA so i can't really blame you if you're gonna hate my map. all the same i love my map, no matter what other people says about it. i just want help with its loading time.

the loading stops at about 90%, where i have to wait i guess about half a minute or so before in continues. once you get to the game it still lags a bit for a couple of seconds then the game usually runs smoothly after that.

i've read the tutorial about reducing lag on loadings and i've done them so far. my map is actually built on DotA Template v1.0 and my Map Init only adds 6 lines of code compared to Ryoko's and AceHart's original. i've also tried preplacing the heroes. i put them all in the center and had them removed in Map Init. so far i think preplacing them made it worst.

My Map Stats
Doodads: 3612
Heroes: 34
Custom Objects: about 900+ i think
Map Size: 1.5 MB (unprotected)
Map Init: 25 lines, mostly declaring variables and running some setup triggers.
Triggers: 901 (99% GUI)

i tried attaching the open map here but the site said it was too big. i could send it to you via email or you can suggest ways of acquiring it. any ideas or advise is appreciated. i'll do anything even learning JASS. if you download the map and fix it, please tell me what you did and how you did it so that i may understand. thanks in advance...

PS: i'm also using Widgetizer + Vex's Map Optimizer. real sorry for forgetting to point that out...
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
try using the search button i think i saw not a while a reducing size tutorial which helps u save some room and makes ur game and loading faster
 

hellmonja27

Member
Reaction score
16
ry Widgetizer, it really helps with loading times. You can find it at the Useful Tools thread.

i'm using Widgetizer+Vex's Map Optimizer. sorry for not pointing that out earlier.

try using the search button i think i saw not a while a reducing size tutorial which helps u save some room and makes ur game and loading faster

i'm having trouble finding it. any suitable keyword or the name of the thread starter? i searched "reducing" and "size" but i haven't found it...
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
901 triggers?! :eek: That sounds like too much... anyway some of them may leak?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
well from what i know most of the things which can cuz loading slow are usually the preplaced unit's and Doodads so try saving room with unit's by creating them in map init and also the large number of triggers u have mabye affecting it as well try mabye reading the shortening triggers tutorial by (elmastfreddie sry if i spelled it wrong)

anyway some of them may leak?
leaks only affect the the rest of the game and will cuz lags but they won't affect the loading since the leaks wasn't even used so no leak was created yet....
 

hellmonja27

Member
Reaction score
16
is 901 triggers really that many? sorry it's my 1st map. but i need those triggers for hero and item abilities. i got the tutorial and will look on it thanks. still if anyone of you would like to have a better look on my map i would gladly send you the open map so you can tell me exactly what i should do...
 

hellmonja27

Member
Reaction score
16
ok i got it (or at least one of it). i experimented a bit more. i deleted all my item recipe triggers and those triggers that swaps recipe display items for recipe scrolls. the map was down to 450+ triggers from the original 901. i saved it, got it optimized and played it. it was a lot less laggier than b4.

now the problem is i need an engine or system for recipe items. is such a system exist? if so i'd really appreciate it if someone would give me a link to where this is discussed...
 

Nigerianrulz

suga suga how'd you get so fly?
Reaction score
198
sorry about that. you can count that as a bump...

a bump can only be done in 24hrs
anyway
for the item recipe maybe give just little clue on the harder item to get and they can figure out the other ones.
Or
Use the item description and tell them the recipes there
Or
Tell them at the end
Those triggers can be done in just a few triggers but im not sure havnt touched WE for so long :p
 

hellmonja27

Member
Reaction score
16
a bump can only be done in 24hrs

so sorry about that. i'll make sure i remember that next time.

i tried searching for item recipe systems. so far they are the same old codes. even the best map editors are giving codes like this. the system i had in mind seems impossible but i wanna know for sure. i'll try to come up with an item recipe engine thingy whatever and if i succeed i'll let you guys see it. since i'm just a mediocre GUI triggerer, don't expect i'll be able to do it. just trying... :p
 

Exide

I am amazingly focused right now!
Reaction score
448
I'm not 100% sure about this, but I believe that a map loading time depends on how much objects (stuff) that your map has to load. Basically, stuff that are on your map.

Those of you who has played Dota Allstars around here knows that everytime a player picks a hero, everyone lags for a second or so. To prevent this, one can place the heroes on the map, this will however increase the loading time.

So I am guessing that you might have placed a hero or three in your map which might increase your loading time. Try to remove them and see if the loading time works better for you.
Also, try to remove some other stuff that can be later added with triggers. (Things that people won't notice in the beginning.)
For example, if you have any hidden units. Remove them and create them with triggers instead of unhiding them.
 
I

IKilledKEnny

Guest
Tips about making map take less space:

  • Make all Triggers that you can as JASS triggers. GUI Triggers are coverted to jass in game (that what I heard), so coverting it to JASS should ease things for the game, especially if you have 900 triggers.
  • Use as many local variables as possible.
  • Remove ALL leaks.
  • Try to pre-place things least as possible.
  • Put a short movie at the start of the game, say 5 seconds, and then over that time create starting triggers.
  • Remember: You may overwrite variables! In the map I'm wroking on now I got all my points in 1 pointvariable with array of 2!
  • Many unit types and abilities slow things down. Here is how to reduce number of abilities: Say you got hero A and hero B. Say the both got pretty similiar ability that you trigger. What to do? Give each of them the same ability but change the trigger!

Code:
E: Unit start the effect of an abilty
C: Ability equal to = is our ability
A: If unit-type of triggering unit is hero A then: Else:

I hope you could understand my horrible English!!
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
Tips about making map take less space:

  • Make all Triggers that you can as JASS triggers. GUI Triggers are coverted to jass in game (that what I heard), so coverting it to JASS should ease things for the game, especially if you have 900 triggers.
  • Use as many local variables as possible.
  • Remove ALL leaks.
  • Try to pre-place things least as possible.
  • Put a short movie at the start of the game, say 5 seconds, and then over that time create starting triggers.
  • Remember: You may overwrite variables! In the map I'm wroking on now I got all my points in 1 pointvariable with array of 2!
  • Many unit types and abilities slow things down. Here is how to reduce number of abilities: Say you got hero A and hero B. Say the both got pretty similiar ability that you trigger. What to do? Give each of them the same ability but change the trigger!

Code:
E: Unit start the effect of an abilty
C: Ability equal to = is our ability
A: If unit-type of triggering unit is hero A then: Else:

I hope you could understand my horrible English!!

1st: straight conversion increases map size.
2nd: in a lot of triggers that's just for convenience, but yea...Long global lists are a pain to work with is the biggest reason. Less active variables probably doesnt make THAT big a difference but w/e.
3rd: Yes.
4th: Preplacing is fine. Not preplacing just means you will have to go through game freezes every time something loads. If an object type will inevidebly be in the game, preplace it.
5th: You don't CREATE anything in a first-5-second-blackscreen. The Blackscreen is usually to prevent whining about start-game lag.
6th: Yesh. Variable reusal is always good as long as you aren't an idiot and overwrite data in use.
7th: What? Give same abil to 2 different heroes with 2 dif effects? What about tooltips, that's ridiculous!
 
I

IKilledKEnny

Guest
1st: straight conversion increases map size.
2nd: in a lot of triggers that's just for convenience, but yea...Long global lists are a pain to work with is the biggest reason. Less active variables probably doesnt make THAT big a difference but w/e.
3rd: Yes.
4th: Preplacing is fine. Not preplacing just means you will have to go through game freezes every time something loads. If an object type will inevidebly be in the game, preplace it.
5th: You don't CREATE anything in a first-5-second-blackscreen. The Blackscreen is usually to prevent whining about start-game lag.
6th: Yesh. Variable reusal is always good as long as you aren't an idiot and overwrite data in use.
7th: What? Give same abil to 2 different heroes with 2 dif effects? What about tooltips, that's ridiculous!

  • Good to know that, however I thought more about re-writing them in JASS.
  • I do believe while loading the game (what he said that takes too long) the game need to create all global variables, thus shortning the list will reduce the loading time.
  • No comment. :p
  • Again, as in 2, from my understanding while loading the game (the first screen you see) the game creates pre-placed units / doodads and such, however if you create them druing the game it will take less time to the game to load at the start.
  • Yes, that's what I ment! I know, horrible English here :D
  • Yeah, I should have probably noted you need to be extra careful doing that.
  • Good point, wasn't thinking straight, please exuce my stupidness.
 

hellmonja27

Member
Reaction score
16
ok real sorry if this sounds stupid, but you mentioned that converting GUI straight to JASS takes much space. ok suppose i convert trigger A then i make an empty custom text trigger named trigger B. i copy paste trigger A's contents into trigger B, convert some globals into locals with my oh-so limited JASS prowess then delete trigger A. will that be ok?...
 

Exide

I am amazingly focused right now!
Reaction score
448
Wouldn't that be the same thing?
 
F

Fluxx

Guest
Tips about making map take less space:

  • Make all Triggers that you can as JASS triggers. GUI Triggers are coverted to jass in game (that what I heard), so coverting it to JASS should ease things for the game, especially if you have 900 triggers.
  • Use as many local variables as possible.
  • Remove ALL leaks.
  • Try to pre-place things least as possible.
  • Put a short movie at the start of the game, say 5 seconds, and then over that time create starting triggers.
  • Remember: You may overwrite variables! In the map I'm wroking on now I got all my points in 1 pointvariable with array of 2!
  • Many unit types and abilities slow things down. Here is how to reduce number of abilities: Say you got hero A and hero B. Say the both got pretty similiar ability that you trigger. What to do? Give each of them the same ability but change the trigger!

Code:
E: Unit start the effect of an abilty
C: Ability equal to = is our ability
A: If unit-type of triggering unit is hero A then: Else:

I hope you could understand my horrible English!!

1.) GUI triggers are JASS are C++ (or whatever the natives are coded in). Converting them in the editor will not only change how they look, but will also increase size. Bad code will still be bad code once it is converted.

2.) Makes no sense. Use as many variables, local or global, as is nessisary and no more.

3.) Agree. If you have forests, for example, try drawing them only three trees deep and leaving the inside empty if it won't be seen.

4.) No comment...if it works, go for it.

5.) Be careful with this, might cause problems if you use globals. You don't want to allow multiple actions to over write needed points or variables.

6.) Not sure about this one, sounds fishy.


If you have more questions to want someone to look at your code and find problems, send me a private message and I will be happy to help.

-Fluxx
 

hellmonja27

Member
Reaction score
16
1.) GUI triggers are JASS are C++ (or whatever the natives are coded in). Converting them in the editor will not only change how they look, but will also increase size. Bad code will still be bad code once it is converted.

i really gotta find time to learn JASS, if i'm gonna get this map as perfect as i possibly can... :(
 

Terrabull

Veteran Member (Done that)
Reaction score
38
One function of Vex's Optimiser is that it converts all GUI Triggers into better JASS then WE Auto-Jass.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top