Ive recently been working on 2 maps. One is big, the other is small. They both lag in multiplayer. The only thing I know that causes lag is if the map has tons of units on it or if its 255 by 255 or w/e. One of my maps is big and does have a lot of units but Ive constantly been trying to cut down on the number of units there are. And every time I play the big map, it goes "Cannot Create More Units" atleast once. What is the MAX number of units allowed?? And is there any other reasons why it might lag? Its kinda like a DOTA map where there are a lot of constant spawns.
My 2nd map is a small map. I have 2 suspicions of why it lags. Its a map that uses constant mobile grids for each player. It seems to lag when theres +2 ppl in the game. 2nd suspicion is that each player has a Wait running all the time. Otherwise im confused.
Just if anyone could give me a list of reasons why maps lag that would be good, these 2 maps im making im pushing my knowledge and skills to somewhat of a limit so I wouldnt be surprised if I ran into some brick walls.
None.
The unit max is 1700, a 256x256 is not going to cause lag, they just tend to since they can fit more at once on them. If you are hitting that limit, then that is definitely the reason why it is lagging. Lots of units moving close together causes lag.
In the second map, a wait will not cause lag, unless you are talking about wait blocks, but that isn't lag. Mobile grids could cause lag, but if done correctly, they don't. Just set up the grid everytime the player moves, instead of constantly.
None.
Hypertriggers tend to make game laggy in multiplayer games.
Once in my map i put HT in and the game was so unplayable i removed it. Game was smooth again.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Yeah but that's because every trigger runs 16x more often than usual.
If you got many triggers that always alter units (create, move, order, set hp, etc.) they will weigh 16 times heavier.
so what if my whole idea for the game revolves around a constant grid system for each player, is there anyway other way to reduce lag? Well, sometimes its constant. Players have the ability increase the delay (Wait) between each grid check. So for example one player might have their grid fire every 500 milliseconds while another player has his fireing every 10 millesconds, and are also able to have no Wait at all (constant fire).
Any other ways to reduce lag besides taking away constant grid firing?
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
I think it makes a significant difference if the units are created "with properties" or not when using a grid.
Btw. you can only make delays in increments of 84ms. Every other value is rounded.
I posted a few actions that are lag intense.
If nothing of them is executed often or always then you might find other reasons in
THIS topic @ maplantis.
I think all reasons for lag are covered there.
Not 84 increments, 42. Now, why would you ever need to have the grid be constant?
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Not 84 increments, 42. Now, why would you ever need to have the grid be constant?
proof?
Ofc 0-41ms = 0ms,
but 42-125ms = 84ms, 126-209ms = 164ms, etc.
I just ran 2 different test maps, one with wait 85, and one with wait 84, at the end of 1000 in-game seconds, the 85 millisecond one had ran 4004 trigger loops, and the 84 milliseconds had run 5338 trigger loops. Proof enough?
Therefore:
True.
42-125ms = 84ms, 126-209ms = 164ms, etc.
False.
None.