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.
  • 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

      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