• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Malhorne
Reaction score
45

Profile posts Latest activity Postings Experience Albums Resources About

  • D
    Oh, alright ^^ I've only seen dyn index used, but linked list sounds sensible too.

    Tbh I now see how much vJass enhances JASS :D All the triggers are like, scopes and there's no custom native declarations >.< Bad thing it's not an active project anymore..
    D
    Yup, you're right.

    I'm already very far in the struct way, so I'll just see how it turns out :/

    But I know JASS2 resources use Dynamic Indexing instead of struct-inspired allocation.
    D
    Alright, thanks for guidance ^^

    Btw, I'm creating a vanilla JASS spell, I'm using your allocation in it:
    function Siphon_Deallocate takes integer this returns nothing
    if udg_SiIArr[this] != 0 then
    set udg_SiIArr[udg_SiIArr[this]+4050]=udg_SiIArr[this+4050]
    endif
    set udg_SiIArr[udg_SiIArr[this+4050]]=udg_SiIArr[this]
    set udg_SiIArr[this+4050]=udg_SiIArr[4050]
    set udg_SiIArr[4050]=this
    if udg_SiIArr[0]==0 then
    call PauseTimer(udg_SiT)
    endif
    endfunction

    function Siphon_OnExpire takes nothing returns nothing

    endfunction

    function Siphon_Allocate takes nothing returns integer
    local integer this
    if udg_SiIArr[4050]==0 then
    set udg_SiIArrM=udg_SiIArrM+1
    set this=udg_SiIArrM
    else
    set this=udg_SiIArr[4050]
    set udg_SiIArr[4050]=udg_SiIArr[udg_SiIArr[4050]+4050]
    endif
    if udg_SiIArr[0]==0 then
    call TimerStart(udg_SiT, Siphon_Interval(), true, function Siphon_OnExpire)
    else
    set udg_SiIArr[udg_SiIArr[0]+4050]=this
    endif
    set udg_SiIArr[this]=udg_SiIArr[0]
    set udg_SiIArr[0]=this
    set udg_SiIArr[this+4050]=0
    return this
    endfunction
    Looks messy as fuck >_<
    ----------
    Here is the thing we can't really know (or I'm not aware and I'll be welcome to know). One solution is that their hashing function takes 3 arguments, the keys and the value and then determine the index.
    Or it is more basic and then the first key give the place in the array and the second key the place in the linked list.
    ----------
    Probably, they use both keys to generate a "hash" for the handle id.
    D
    I think it's made with dynamic arrays.
    Mother dynamic array to point to its children,
    and child dynamic arrays which have the values.
    D
    Hey :)

    ----------
    its implementation is like a real hashtable AFAIK
    ----------
    not sure what you mean :/, sorry :D
    D
    What you think of this? UI v1.0.1
    D
    Oops, you're right, I don't need head >.<

    Thanks for pointing that out, will remove in next ver..

    What'ye think, should I submit the Stack onto the Jass forum?
    D
    ----------
    Also I think that this kind of system don't really need its own allocation.[/quote ]
    It's for if you want to use your own allocation.

    ----------
    overdid
    ----------
    Well, what is done is done. The newest version works like a charm :)


    I had to have both prev and next because I want to be able to forget data from the middle.
    ----------
    D
    I did something like that ! :p

    Sorry for the delay, this took longer than expected as I had to make my own Stack (with textmacro):
    Stack v1.0.1
    Which needed its own LinkedList:
    LLMod v1.0.0
    And allocation:
    Alloc v1.0.0

    So yeah, here's the current library:
    Attackers v1.0.2

    How you like it, is there something to change?

    And if you spot something I'll ofc add you in the credits :)

    EDIT: Updated the pastebin links, it seems like it doesn't work that well, GetUnitAttackers() will return too high numbers, even though I debugged it and it says it forgets them as attackers :/

    I'll create it from scratch for the 4th time tomorrow, atm I'm fucking tired of this thing...

    I'll just need to approach it from different angle I guess... *sigh* wasted 4 hours creating those shits

    EDIT2: I think I got it to work! I just had to redo it four times :D
    how you doing bro, ready to get a peek of the almost finished map?, can you test it if it's OK?
    D
    ----------
    Anyway at the moment I can't but in two months I'll be able.
    I don't know.
    I'll think about it :p
    ----------
    Get the busy things in your real life done first, wait until there's free time in your life enough, make your decision then.


    ----------
    But I don't know now if I still can ^^
    ----------
    Whatever you happen to mean with that? JASS2 isn't that vaguely big, I think you have more than enough of knowledge to enroll.
    D
    ----------
    Oh gosh !
    ----------
    Ahaha XD

    But I could nominate you over the mod's lobby, if you're interested in it?

    In my opinion any help at the spell section is welcome (as long as there's my resources unapproved...)

    Ofc it's your decision, it will require a lot of effort and you'll need to take on the community bragging about 3/5 rating xD
    D
    Is ResumerTimer() faster than ExecuteFunc()/TriggerExecute()?

    Just asking cuz you like to talk about benchmarks :p
    actually the spell is a good idea, I added some sfx and condition of the state max mana and yes we may post it...I'll give you my version once I've finished the AutoCastSystem that I've made...Im making a series of AI systems btw...
    is it OK if I edit some of the code?, like adding SFX when mana is recharge and add a dummy caster to it?...credits will be full for you btw :D...
    Sure. ask away :wgrin: Nah, anyway do you need a updated avatar, given the month I am reopening that thread again.
    Ok no probs about the DA map, just the priest spell is ok, coz I need to post the map as a teaser in the map section...
    That would be nice lol, but maybe when you aren't busy, I don't wanna drag your projects bro :D
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top