If anything Nestharus has been saying is right, then there exist special data structures to handle efficient positional enumeration. If WC3 uses these structures (which it should seeing how often positional enumeration is used) then both methods will be likly as fast. In any case the difference between the group fillers is so small that there will be no noticable difference.
On the other hand, you having to call another function to move a rect will make it slower than enumerating units in a circle of a point definatly.
interesting! did he make a use out of it? i searched his posts, but there are many...
i also *believe* wc3 engine often uses mechanics unavailable in editor - for a various reasons... let's just mention game age, and computing/graphical power available at that time - and how often speed issues still appear...
Spartipilo said:
Nah.. If you say exactly what you need we may be able to help you finding the best way to do it
sure, only reason i skipped this is that i thought question is general enough and wanted to skip long text. but, ok, here it is - i'll try to be concise
1. map is TD type, more precisely two out of three unofficial LegionTD offsprings (UE and X3)
2. i'm neither original author, rather second-in-line of successors - explaining my noobness in WE (while i do have some programming background)
3. at one time, it was REALLY popular map, was hosted constantly - furthermore, lags were so low that people with bad connection (0.25mbit upload, for example) could host 4v4 easily on bnet
4. ok, intro over - at one PRECISE point in development, map became SO laggy that even hostbots couldn't handle it. fixes were applied, but game remained in host-bot power only
5. original author left project at this time (unrelated to lag issues), but left open-code version for eventual successors - concludes 'legitimacy part'
ORIGINAL author = LISK, MODDER of open version = EGZE, me = merely maintainer the egze's map, which i have written permission to do
here's open map source:
http://www.legiontd.com/file/Legion150c - Editor's Version.w3x
under ABILITIES (folder) in TRIGGERs, pls look for "Autocast Mindwarp" and "Autocast Seduce smart"
i
strongly believe things like that are causing lags - they give some AI to previously random triggers (as i suppose, no open code available), at heavy price - they are both needed and slowing game down
(oh, btw, leaks are fixed and number of other lags are reduced, by several people - and i thought giving you link to open map might be better - if someone far more competent than me looks at it, even for a glance) he might notice more lag culprits)
what i'm working on is FINISHED project (just to mention it's not work-in-progress or some 85% complete map) - of course, it continues to evolve and new content is being added, not helping map speeding-up
this is kinda sad, since map is now, after more than a year of working, richer, better balanced and more fun to play
what i EXACTLY want is to reduce lags to bearable point - and thought, possibly wrongly, that constant area checks and group forming are bottle-neck, or at least good part of problem
if you can help with, say, one of triggers i mentioned, i would be most grateful
if you can pin-point of some other stuff causing lags (EXCEPT leaks which are dealt with), i would be even more grateful and grant you a castle once when i achieve world-domination
thanks in advance!