• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Attachment systems obsolete?

Status
Not open for further replies.
Level 6
Joined
Jun 30, 2006
Messages
230
Forgive me and be patient if this has already been asked (I've been gone a while), but are attachment systems obsolete since Hashtables came about? In particular, I'm asking about Cohadar's ABC. I'm using an ability I made years ago that uses ABC, so I am interested in knowing this.
 
ABC now uses a hashtable.

Yeah, some older systems have become obsolete (but still usable though [as in, some still function]), but there are still faster means of attaching.

Systems like TimerUtils, T32, and Key Timers 2 are used more often nowadays for all your timer needs.

For attachment, it really depends on what you are looking for. Usually, hashtables will get the job done easily, and fast as well.
 
Level 6
Joined
Jun 30, 2006
Messages
230
What would you recommend for an attachment system these days? Basically, which is your preference? I like ABC, but I'm not devoted to it... I know it was great in its day, but I'm always up for change.
 
Either TimerUtils or KT2 are nice to choose in the beginning. They are both very easy to use and work well. After you get the hang of more vJass kind of stuff, T32 works well and is ideal for spells. If you don't like using systems, you can always just do your own manual struct/stack looping/arrays/list, but that is a little bit more difficult for some people.

My suggestions are: If you want a high frequency somewhere around 0.03125, use T32. (It has a fixed period of 0.03125, which is generally used as a period for timers for spells, projectiles, sliding etc.) If you are looking for a flexible frequency, use either KT2 or TimerUtils. If you are looking for a longer period, use either TimerUtils or TriggerSleepAction.

=)

In real situations, with many instances going on, you still won't notice a difference. It is up to the user mostly, whichever interface they find best. Even if you use a hashtable, the speed difference is not noticeable.
 
KT_Add and KT_GetData. The code isn't simple to read but the functions are easy. The only thing some people might overlook is the return boolean part, but that part is easy enough to understand once they read the documentation.

KT is efficient because it uses one trigger and one timer per period, opposed to timer per struct like some other attachments. When a period is added, it will create a timer and trigger for it. Once a new addition of that same period is made, it will add that timerloop func as a condition. The timer with that period is meanwhile consistently looping to a periodic function. This evaluates the trigger and allows for all the timerloops to be executed.

Basically, a timer and trigger per period, and then it loops the timer to evaluate a trigger. When you add, it will add a condition which will be evaluated on the loop. Yeah, a lot of controversy was made and people generally don't accept KT, but it is meant to be used realistically. In an actual map, having one timer/trigger per period > having a timer per struct. ;) His code may be incomprehensible, but it isn't inefficient as most people say it is.
 
Level 6
Joined
Jun 30, 2006
Messages
230
Eh, I don't use these systems for much. I may just keep ABC. Although, since I don't use them much, it should be easy to switch if I feel like it. I'm going to bookmark this though. Thanks guys.
 
Status
Not open for further replies.
Top