Which is Best of the attachment systems?

Vassilev

New Member
Reaction score
39
Which is the best of the attachment systems? Why is the best better than the rest? Also I heard that Kattana's one should not be used anymore?
 

Dr.Jack

That's Cap'n to you!
Reaction score
109
Depends which Handles Attachment system you are talking about... PUI is a great system to attach structs to units. If you want to attach a struct to other handle, well you are going to have to use other system like ABC.
 

Vassilev

New Member
Reaction score
39
Handles attachment or PUI?

Which is better? handles attachment system or PUI?

I know handles uses gamecache and exploits a bug to save local variables and allow MUI.

PUI on the other hand uses a global array system with a recycling index with a limit of 8192 ( i think) and uses up the unit custom value.

So I want to know what are the advantages and disadvantages of each.
 

saw792

Is known to say things. That is all.
Reaction score
280
Don't use Local Handle Vars. That is outdated now.

PUI is only for UNIT attaching. Ie, when you want to attach a struct to a unit that includes data about the units previous position, next position, stat changes, etc. Many basic spells will not require unit attaching at all.

For attaching only to timers there are options like TT, ABCT and TimerUtils which provide fast attaching for timers. TT is for short period timers, ABCT is for longer period timer. I am unsure about TimerUtils (may be short or either).

For general attaching, CSData is about as basic as they come. It is quick and simple to use, and does not require the data to be removed from the handle attached to. It is used to attach integers (ie, structs) only.

Other slightly more advanced systems include ABC (the quickest of them all?), HAIL and HSAS.

So in conclusion, for simple timer attaching use one of the timer attachment systems. For basic all-purpose attaching use CSData or ABC, and for unit attaching use PUI.
 

emjlr3

Change can be a good thing
Reaction score
395
fastest = no attachment system (struct stack)
second fastest for multiple timers in same interval = TT
third fastest = CSData
safest = Not CSData
for idiots = ABC/HSAS/HAIL
units = PUI
etc...

really depends on your needs
 

Vassilev

New Member
Reaction score
39
>>> for idiots = ABC/HSAS/HAIL

do you mean for idiots as in Computers for dummys, or idiot imbecile? :p
 
Reaction score
456
> fastest = no attachment system (struct stack)
Not really. I think TT handles 100 instances better than struct stack.

> units = PUI
PUI doesn't attach anything.

> for idiots = ABC/HSAS/HAIL
Maybe ABC isn't that good for low interval timers or some triggers. But dialogs and regions are another thing.. (Cohadars DS for an example)
 

emjlr3

Change can be a good thing
Reaction score
395
>>> for idiots = ABC/HSAS/HAIL

do you mean for idiots as in Computers for dummys, or idiot imbecile? :p

as in, if you really dont get JASS very well, or are prone to making mistakes, use those

> fastest = no attachment system (struct stack)
Not really. I think TT handles 100 instances better than struct stack.

> units = PUI
PUI doesn't attach anything.

> for idiots = ABC/HSAS/HAIL
Maybe ABC isn't that good for low interval timers or some triggers. But dialogs and regions are another thing.. (Cohadars DS for an example)

  • struct stack is still faster then TT (Dont quote me)
  • PUI allows you to retrive data you store in a global using units user data - its a means to an end, in that case (if you want to be technical)
  • still doesnt beat CSData (unless your a dummy, ofcourse)
 

Flare

Stops copies me!
Reaction score
662
as in, if you really dont get JASS very well, or are prone to making mistakes, use those
Wouldn't HSAS be something to stay away from in that case, assuming that, by mistakes you mean something that would include leaking handles (since, AFAIK, HSAS can be pretty much brought to a halt after handle leaks)?

I am unsure about TimerUtils (may be short or either).
I don't think the frequency for the timers really matters with TimerUtils :p

Anyway, there isn't anything that can particularly be regarded as 'the best' - each have their advantages and disadvantages, and in the end, they (should) all work well enough to the point where their disadvantages shouldn't have any noticeable impact on the game, unless you do stuff wrong :p

So I want to know what are the advantages and disadvantages of each.
From what I recall:

  • CSData - Fast, dead simple, can be broken by (highly) excessive numbers of handle leaks (approx 400,000 by default, before every usable handle-type is affected, I believe?), usable for all handles
  • Timer Utils - Timer-only, not sure about speed and reliability (since there are 2 variants of it, Red and Blue)
  • TT - Fast, usable for high frequency timers only(?)
  • ABCT - Fast (I think), not as effective for higher frequency timers (not sure where it begins to be more viable to use TT over ABCT though)
  • HSAS - Fast (not as fast as CSData, I think), can attach to all types, I think it's also fairly easily broken by excessive handle leaks, but that may have changed since I last checked, I think it can attach any variable type (not just integer, like most others) through the textmacro but I could be wrong
  • HAIL - Fairly fast (I believe it's somewhat intermediate to HSAS and ABC in this regard), and I'm 90% sure that it isn't greatly affected by handle leaks (I believe the storage method is changed after about 8000 handle leaks by default), can attach any type of variable to any handle and can also attach any type of variable to a pair of handles (through the CreateProperty macros)
  • ABC - From what I know, it's the slowest of the bunch (maybe this has changed, I don't really know :() but it is unaffected by handle leaks, and can only attach integers to timers, triggers, regions and dialogs
  • Table - vJASS gamecache, not sure about speed (probably something similar to most gamecache-based stuff), can attach integers (I think) to handles, strings or integers
  • PUI - Units only, but very easy to use (IMO) and very little work on the part of the end-user (since it's just a macro and slightly modified array usage)
 

Vassilev

New Member
Reaction score
39
Ahhh.. thank you all.. i've read through alot of Cohadar's systems... very... mindboggling :nuts:

So... ABCT is better than ABC?
 

Flare

Stops copies me!
Reaction score
662
So... ABCT is better than ABC?
Well, ABCT is faster (I think), but it is exclusive to timers (which does make it quite limiting) - as long as the system works, it generally shouldn't matter what you use, since the differences in speed are probably never going to be noticeable in-game (and, in the end, isn't that what really matters?)
 

Trollvottel

never aging title
Reaction score
262
well there are always speed differences, but none of the Systems listed here is really bad, so you should use the one you like most.
 

Vassilev

New Member
Reaction score
39
okies, thanks :)

>>>Well, ABCT is faster (I think), but it is exclusive to timers

to be honest, i seriously haven't found a need to use attachment systems other than for timers :p
 

saw792

Is known to say things. That is all.
Reaction score
280
Flare said:
Well, ABCT is faster (I think)...
Actually, I believe using ABC for timers is faster than using ABCT. I think ABCT is more for convenience. I remember a post by Cohadar at some point saying this. It could be in one of his threads in Cohadar's Corner. Let me try and find it.

EDIT: Here we go:
Cohadar said:
Using ABC directly is slightly more efficient than ABCT witch[sic] only has the benefit of being easier to program.

Link to post:http://www.thehelper.net/forums/showpost.php?p=660762&postcount=26
Link to thread:http://www.thehelper.net/forums/showthread.php?t=76047
 

Vexorian

Why no custom sig?
Reaction score
187
CSData is actually not that unsafe, well, at least since 15.something, it used to be rather unsafe, but now you would have to leak a lot of handles before having problems with it, and your map would already be suffering from the leaks anyway.

I think that you get something good for units, like PUI_struct or unit groups, then you can really (And I mean really,) be just happy with TimerUtils, both flavors are quite safe and fast, however, blue TimerUtils is very safe (yet not too fast), while red TimerUtils is very fast (VERY fast) (Just get used to not leaking your timers and you will be ok)

I am now unable to think of good handles besides units and timers in which anything more complicated than gamecache or just CSCache is necessary. As a matter of fact, with units and timers you probably have 99% of all attachment cases, cause god knows you shouldn't be attaching to triggers, for example.

Edit: Really, Red TimerUtils is VERY fast, it gets inlined, the only way to beat it would be by making a static timer loop. The best thing is that using it won't prevent newbies from implementing your spells/systems cause they can just use the blue flavor if their maps aren't too safe for the red one, and it does Timer recycling as well...
 

Viikuna

No Marlo no game.
Reaction score
265
Gamecache is actually pretty good, even it is a bit slow. You only need fast attaching with timers, because you retrieve your Data every 0.03 seconds or something like that.


Thats why I use TimerUtils and Table.


(Actually I dont use neither of them right now, because my map doesnt need attaching. I can just recycle all my units, abuse Set/GetUnitUserData and use static timer loops)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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