AIDS or AutoIndex?

Bribe

vJass errors are legion
Reaction score
67
I've opted to run with a unit indexing library because I want access to UnitUserData (to not use hashtables wastefully), and I know it's taboo to use that feature without proper handling.

What would be the pro's and con's of using one or the other? I'm looking for things like:
  • Which is the most popular?
  • What features does one have that the other does not?
  • Any bugs or "gotcha's" I should know about?
  • Differences in performance?

Thanks :)

Please note I have no interest with "aids structs" or the like. Ideally, there are three things I want:
  • GetUnitId
  • UnitExists Event
  • UnitDeath/Removal Event
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Probably the most important decision factor when selecting the indexing system is the systems you want to use in your map. Performance-wise, they should be pretty equal.

I prefer AIDS, however, for two reasons:
- Jesus4Lyf's systems always use AIDS (you can't blame him for that :>) and Jesus4Lyf did write a system for almost any aspect of mapping. That way you can ensure perfect compat 99% of the time
- AIDS has PUI property and PUI structs for compatibility ... PUI property is awesome if you want to add simple custom stats to units, as you can do that with a 1-liner.

However, in the end, it doesn't really matter, as most of the systems use GetUnitId anyways and this command is the same for all indexing systems.
All you have to do is changing the library requirement to AIDS or AutoIndex, depending on what you use.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Depends on.
If you loved to use systems at here, use AIDS.
If you loved to use systems at wc3c, use AutoIndex instead.
 

Bribe

vJass errors are legion
Reaction score
67
I've been toying around with AutoIndex/AutoEvents and found that the unload/load transport and reincarnation start/finish are perfect compliments for my system, because I should destroy the struct when the unit itself is not capable of moving.
 

Jesus4Lyf

Good Idea™
Reaction score
397
What would be the pro's and con's of using one or the other? I'm looking for things like:
  • Which is the most popular?
  • What features does one have that the other does not?
  • Any bugs or "gotcha's" I should know about?
  • Differences in performance?
Kingking and Zwiebelchen pretty much nailed it, but...
To delve a little more into subtleties in an unbiased fashion (because I honestly don't care which you use):

>Which is the most popular?
AIDS here, Autoindex on WC3C.

>What features does one have that the other does not?
AIDS has struct locking so you can make an index live longer than a unit (and backwards compatibility with PUI).
AutoIndex has a just-before-unit-leaves-game event. AIDS' event actually fires the frame after the unit leaves, so you do not have access to it.

So there is a subtle philosophical difference. AIDS believes you should be able to extend the life of a struct longer than the unit if you're not done with that data, AutoIndex believes you should have access to the unit the instance before it leaves the game.

There are other new things with AutoIndex I'm not familiar with. I'm sure they're pretty cool, but could be done with AIDS also. :)
AIDS also has other features I haven't mentioned - I just wanted to mention the key difference that would always separate the two.

>Any bugs or "gotcha's" I should know about?
AIDS structs use the unit id for their index. AutoData does not. Means AIDS structs are slightly (in some stupidly small way) more efficient to load, but you need to use this [LJASS]extends array[/LJASS] thing.

Do not issue an undefend order to units in transport with AutoEvents, or pause units while they are in transport. :)
The AIDS equivalent is Transport, which has the limitation of not moving a unit whilst in transport.

Now for my personal opinion:
I made AIDS for AIDS structs. I use AIDS structs for everything.
AIDS structs are all I need. :D
They do not use a struct allocator/deallocator every time a unit enters/leaves the map.
 

Bribe

vJass errors are legion
Reaction score
67
I didn't spot the keyword "Reincarnate" or "Resurrect" in the AIDS struct. Is there functionality to recognize that event or would I have to program that myself, if I were to switch over to AIDS?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
I didn't spot the keyword "Reincarnate" or "Resurrect" in the AIDS struct. Is there functionality to recognize that event or would I have to program that myself, if I were to switch over to AIDS?
Actually for those event(are made for AutoEvents), you can trigger them by yourself.
 
Reaction score
91
Systems should not be chosen by their popularity among some websites but by their usefulness to you. If you feel AIDS is what you need, go ahead and use AIDS. The same applies for the other sys.
 
Reaction score
91
AutoIndex can use a hashtable instead of UnitUserData and thus they won't interfere with each other.
Speaking of popularity, now I see that you're a system maker so, yeah, it has been said above - AutoIndex is more popular at wc3c.net and AIDS is popular here. As a sys maker you'll have to make a compromise and probably have 2 versions of your scripts (if you want to post them on both sites). :p
 

Nestharus

o-o
Reaction score
84
You can also use my newly released Unit Indexer: http://www.thehelper.net/forums/forumdisplay.php?f=131

It includes complete APIs for the other indexing systems (AutoIndex API was a pain..), so you wouldn't have to change your code (you could make it a bit more efficient). The only prob is that it has the same issue with not being able to get the unit before it goes out of scope like AIDS : (. I'm still trying to figure out how to do it, but multiple undefends are a living hell /cry. Oh yea, and you can have AutoEvent in the map and it won't throw syntax errors because I really meant that it has every public method, operator, and field you can get for each of the systems (except it excludes the public functions that you aren't supposed to be using in AIDS, the ones with AIDS_ before them).

This also does not have struct locking because I didn't see too much of a purpose to it. I felt that the overhead didn't justify the feature since you should be cleaning up your data as soon as the unit goes out of scope : |.

It also includes event add ons like AutoIndex, which are Resurrect, Animate Dead, and Death. The reason they are there is because they are best done inside of an indexing system : D.

I can do things like reincarnate as well, but those can be coded completely separately.

I'm also planning to support the AutoEvent API for use with Unit Indexer : P.

Oh yea, and until I make the AutoEvent API for use with Unit Indexer, the 3 events i mentioned above won't run for it. Don't worry, I'm getting there ; o.


edit
Unit Indexer can now access units before they go out of scope (on remove, on decay, on explode)

edit 2
Oh and performance wise...

AutoIndex is by far the worst because it evaluates a lot of triggers rather than using triggerconditions and evaluating one trigger. It's speed would be about half the speed of AIDS and Unit Indexer.

Between Unit Indexer and AIDS, I'm not sure at the moment... AIDS has the overhead of locks and uses a timer to determine when a unit goes out of scope. Unit Indexer has the overhead of a couple of extra array sets + timestamps. It uses the timestamps to determine when a unit goes out of scope.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
As long as the system does not cause lag and bug, it is good to use with, IMO.
 

Nestharus

o-o
Reaction score
84
PS. @Nestharus: Grim conducted benchmarks. You made a bunch of assumptions and stated them as fact. Please, stop it. You do this always.

not at all assumption -.-...

Actually, AutoIndex runs through a loop of trigger evaluations (vJASS evaluations, which was like 17 ms compared to 11 ms? pulling these numbers from a thread I saw over a year ago on wc3c when they were benched, so I might be a little off) and a group of triggerconditions on one trigger evaluation is much faster.

The ratio, if I remember correctly from my tests a very long time ago, was about trigger evaluations * 2 - 1 : triggerconditions, but again that was a very long time ago so that ratio might be a little off. vJASS evaluations will ofc be worse =).

I haven't been able to get RtC to run lately, so no way for me to bench it again.

edit
Nestharus' code looks like it would fail recursively. So that's out on the "bugs" criteria.

And btw, when it came to indexing/deindexing and all of the add on events, I tested very thoroughly and it has no bugs for the events -.-... Unit Indexer uses time stamps and state booleans, so everything runs just as it should.

I also made sure to use units with multiple defend abilities, tried to remove units multiple times, etc.

edit
Oh yea and I will recommend w/e system I damn well please. If I like it, I'll recommend it.

I've recommended graveyarded systems before as well.
 

Bribe

vJass errors are legion
Reaction score
67
When I'm done making some tactical adjustments, I'll copy the system so it uses AIDS, as I have come across some weird events with AutoIndex (huge lag when I called RemoveUnit, hence the use of ExplodeUnit, which may be more efficient anyway).
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top