HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing tavern lag?

03-30-2005, 10:42 AM#1
qwertyui
When a map uses tavern-type hero selection, it usually lags when the hero is bought and created. This is a bit of a bother in early hero selection process, when many lags occur over a small time period.

Is there any way to mend this problem, without loading all heroes at map initialisation?
03-30-2005, 01:24 PM#2
Panto
Well, the problem is that it's loading all the model and object data for that unit the first time it's used, so the effective solution is to move that loading time into the period before the game starts. What else were you hoping for?
04-13-2005, 07:54 AM#3
qwertyui
Well, the thing is - i don't want to have my 34 heroes load on map startup.

Let me put it in a different way.

I intend the map to work like this:

Players are initially given 30 seconds to pick their hero. During that time, no heroes need to be spawned. When the timer expires, all players will have their respective heroes picked, either by hand or randomly.

When the timer expires, all heroes are created at their starting locations.

Now is it possible to make the all the loading for heroes happen not on map startup and not when hero is selected at the tavern, but rather at the time they first spawn?

It would be best if i could catch the event when players clicks on hero to purchase him at the tavern, store the hero-type purchased, but preventing the immediate hero spawn - is it possible?
04-13-2005, 01:39 PM#4
Panto
If you made items with the icons and descriptions of your heros and had the players buy those instead, storing which item was purchased and then creating heroes later based on each player's item, that should do what you want.
04-13-2005, 04:09 PM#5
Azhag
Find a safe area where the players could never get and see, and place all the heroes there. Give them to neutral passive, and that will make it so they won't lag. Since the heroes have already been loaded, and are on the map, when you purchase them, tada, no lag.
~Azhag~
04-14-2005, 01:34 AM#6
Panto
Azhag, pay attention. He *wants* them to load, not during init, but at the point when the players all start using them.