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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top