HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Tutorial Request - Preloading

10-01-2007, 08:53 AM#1
cohadar
I would like to ask someone to make a tutorial on this subject.

It should include answers to questions like,
what is preloading and why use it (why starting lag happens blah blah..),
why maps sometimes crash on loading, how to avoid that (with explanation of OP limits)
Elapsed game time 0.0 , TriggerEvaluate() and all that stuff.

And for now I would like to ask just how to preload a damn spell ability
because I know there is something you pass ability string to make that happen,
but I can't remember what and I can't remember where I saw that.
10-01-2007, 09:01 AM#2
Anitarf
I usualy use the UnitAddAbility function for preloading abilities.
10-01-2007, 09:06 AM#3
PitzerMike
And Preload("myart.mdx") and Preload("myart.blp") if there's some art involved upon casting the ability.
10-01-2007, 09:10 AM#4
Malf
How much loading time would each preloaded object increase?
10-01-2007, 09:19 AM#5
abriko
Preloading abilities ? To make no lag for new unit hero selected or custom abilities added during game ?
I just put a unit on the map with all the spells and hide it at the beginning.
10-01-2007, 09:49 AM#6
cohadar
Quote:
Originally Posted by Anitarf
I usualy use the UnitAddAbility function for preloading abilities.

???
UnitAddAbility is what is causing lag at my case because I add abilities to units when they are created (and I mean like 7 abilities) and since abilities are not loaded it blocks the game first 5 sec.

I see we already have some tutorial material here.
EDIT:

Jass functions:
Collapse JASS:
Preload
PreloadEnd
PreloadEndEx
PreloadGenClear
PreloadGenEnd
PreloadGenStart
PreloadRefresh
PreloadStart
Preloader

ffs what is all this used for???

EDIT2:
Quote:
Originally Posted by Malf
How much loading time would each preloaded object increase?
I presume the same time it takes it to lag out.
10-01-2007, 09:56 AM#7
Toadcop
Quote:
I presume the same time it takes it to lag out.
if do that on init it will take less cause there is no 3D rendering etc... war3 is concentrate all it's processing on loading.
10-01-2007, 10:17 AM#8
Malf
Hmm, but people tend to like maps that load quite fast.. Maybe after map init make the screen black, have an intro message like the ones from tob and doe and say "Loading, Please Wait a Moment.." And initialize stuff at that timeframe.
10-01-2007, 10:20 AM#9
cohadar
Quote:
Originally Posted by abriko
Preloading abilities ? To make lag for new unit hero selected or custom abilities added during game ?
I just put a unit on the map with all the spells and hide it at the beginning.

This worked just fine, I created one dummy unit I named preloader,
put it on the map and stuffed it with like 50 abilities (yes it is possible :)
and then simply removed it later and tadaaa, no lag.

Quote:
Originally Posted by Malf
Hmm, but people tend to like maps that load quite fast.. Maybe after map init make the screen black, have an intro message like the ones from tob and doe and say "Loading, Please Wait a Moment.." And initialize stuff at that timeframe.

No people tend to hate maps that take 10 min to load because some noobcake thought it would be a good idea to make an 460x460 AoS map with all custom icons, custom models, custom lightning because he thought that fancy designs will hide the fact that his map sux balls.
10-01-2007, 10:40 AM#10
Anitarf
Quote:
Originally Posted by cohadar
???
UnitAddAbility is what is causing lag at my case because I add abilities to units when they are created (and I mean like 7 abilities) and since abilities are not loaded it blocks the game first 5 sec.
Exactly. That's why you use it to add abilities to a dummy unit at map init, so the loading lag happens then. You can of course also place a unit that already has all those abilities, but then you need to make one in the object editor.
10-01-2007, 10:41 AM#11
Malf
Quote:
Originally Posted by cohadar
No people tend to hate maps that take 10 min to load because some noobcake thought it would be a good idea to make an 460x460 AoS map with all custom icons, custom models, custom lightning because he thought that fancy designs will hide the fact that his map sux balls.

That is exactly the idea behind what I just said. Yanno, "people like fast loading" and "people hate long loading" . And if the mapper really do cares about his map, he'd do something to get rid of that loading time. Usually by using Widgetizer and such. If he can't then his map will probably suck.
10-01-2007, 12:33 PM#12
Rising_Dusk
Quote:
Maybe after map init make the screen black, have an intro message like the ones from tob and doe and say "Loading, Please Wait a Moment.." And initialize stuff at that timeframe.
You know, that's exactly what I do in DoE and what I presume was done in ToB. :p
It works great, I don't have to call any of those silly Preload functions and I get no first cast lag.