1. The long-awaited results for Concept Art Contest #11 have finally been released!
    Dismiss Notice
  2. Join Texturing Contest #30 now in a legendary battle of mythological creatures!
    Dismiss Notice
  3. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  4. Hivers united and created a bunch of 2v2 melee maps. Vote for the best in our Melee Mapping Contest #4 - Poll!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

[System] MissileRecycler

Discussion in 'JASS Resources' started by Bribe, Oct 27, 2011.

  1. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Ahem, I did use one aspect of his code, and that was the idea of using timestamps for recycling rather than timers ^)^. That was a good idea, so I took it. I just added credit to my submission for that idea as the implementation was the same.

    I did not add credit for the idea of recycling dummies with unit facing as the implementations for that were drastically different. I only added credit for implementations that I took from him, and the only one I took was the timestamp one. He may say that I'm using queues as well, but the idea to use queues did not come from his resource or from his suggestions, which is why he isn't getting credited for their use.


    And no, I am not attempting to one up his resource because of some ego. I need a Dummy Recycler and I refuse to use his because his implementation is bad. Him changing his implementation to my implementation is ofc messed up to say the least.

    edit
    btw, thanks Phtes for talking some sense into me about him stealing my work.


    edit
    If you support Dummy's API and fix the angle stuff and then give credit for all of the implementations of mine, then we could have both resources up with my 2 styles idea (your safety style and my safety style). Just please be sure to give credit where credit is due as I spent a long time on that design. Also, you could keep it as the round robin design, add support for Dummy's API, and then keep it as your own stuff as the round robin thing was yours =). From here, we'd have two different dummy recyclers with two different behaviors and pros/cons to each one =). Ofc, we'd really need to weigh the pros/cons of the round robin style vs the other style as I don't know if the extra unit creation/destruction is worth it.
     
    Last edited: Mar 31, 2012
  2. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Nestharus I'm going to have to assume you are ip spoofing and trolling me. You can implement a better model all you want but the key elements that provide UTILITY here were designed by myself and the queue idea was anitarfs. I spent a lot of effort coining up with the original implementation and making sure it didn't bug, I don't care how much time you spent on your rewrite of my resource you are notorious for not giving credit and this is just another example of it. I will ask ralle for a different approval system like you asked for, because you're using a lot of really dirty tactics.
     
  3. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Phtes is one of my friends that used to mod. I asked him for his advice on the matter on msn.

    And btw, you can look in the docs. I've already given you credit for everything that I used from your implementation.

    edit
    And btw, I think that you are being slightly crazy right now. We're both in chatroom waiting for you, but I don't know how much longer he'll stay on =o, so hurry up >.<

    edit
    Also, I know that you put a lot of effort into this, which is why I was being nice and so on, I just found it unfair for you to take my implementations, which is again why I asked Phtes for advice on msn.
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    It's easy to log in twice on the chat room as well, I really just can't take you seriously. Especially not with this guy having only 1 post. How long did it take for you to add TheDamien to the credits of ASCII? But with Cohadar's JassHelper we can graveyard the newer implementations anyway. But that won't happen because I would want to graveyard a lot of your rewrites if I were thinking about it objectively and not siding with you so much of the time.
     
  5. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    The new version has new functions that Cohador's version does not ;\, which is why I didn't call for it to be gy'd.


    And seriously Bribe, you are being crazy. Everyone in chatroom is waiting for u.

    edit
    btw, using 2 accounts is an offense that you can be banned for (it's very serious). IF you seriously think I am using two accounts, then contact Ralle about it.
     
  6. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,007
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    2 accounts?

    [​IMG]

    Lembidi has at least 4 excluding his account (Lembidi) that I know of, and possibly more.
     
  7. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Any chance of you attaching the dummy.mdl model or linking it in the first thread?

    Would prove quite useful.
     
  8. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Interesting, I thought I had attached a demo map.
     
  9. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,007
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    Graveyarded.
    It's outdone by Nestharus' Dummy. :/
     
  10. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Moved back into Submissions category. Should this be re-approved?
     
  11. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,578
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Maybe this could utilize DummyUnitStack? Unless there's something I'm missing.

    Also, where's there ever a discussion about libraries requiring off-site resources (Nestharus -.-). I suppose we link wc3c scripts, so it shouldn't matter too much I guess.

    EDIT: Apparently the only reason it's required is because of
    set UnitIndexer.enabled = false


    If you want to include UnitDex the syntax is
    UnitDex.Enabled=false
     
    Last edited: Mar 14, 2014
  12. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    This is specifically for facing angle preservation for arrow like missiles. I too agree that the unit indexer part should be changed but I'd like to test the new unit Dex that you made first
     
  13. Cokemonkey11

    Cokemonkey11

    Wurst Reviewer

    Joined:
    May 9, 2006
    Messages:
    3,183
    Resources:
    18
    Tools:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    2
    JASS:
    7
    Resources:
    18
    I've never seen this before, but it looks like one of the best resources I've seen by Bribe. How could this possibly have been graveyarded because of nesthaus code? I guess it must have had a big update
     
  14. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,578
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Ah I see, sorry I missed that.
     
  15. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,578
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Does this still require Cohadar's JH?

    If so any chance you can make it work with Vex's?
     
  16. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    The only thing it would need from what I can tell is to be initialized from a module. But even then I don't think it's that important - who will be creating missiles during init?
     
  17. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,578
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    I personally would remove the print function and just inline the debugging messages. It's only one line. I understand it was easier for you to code though.

    Code (vJASS):

    set bj_lastCreatedUnit = u
    set u = null
    return bj_lastCreatedUnit
     


    I forgot. What was the consensus on using globals like bj_lastCreatedUnit?

    Are you trying to prevent a leak or something?

    Regardless this can be approved.
     
    Last edited: Sep 20, 2014
  18. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    The bj_lastCreatedUnit is just a free global that I used to prevent the un-nulled handle leak.

    As far as the 'print' function I find it a good programming practice. Let's say you want to change the color of that particular debug message or change a prefix. Rather than searching through all of your debug messages and making that change you can make it from just one function. Since debugging is 95% of the work with code, it works well.
     
  19. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    You should move the following from RecylceMissle to GetRecycledMissile.
    The reason is, that if you scale a dummy unit and attach a special effect to it
    the effect will also scale to let's say 0.5 of it's original size.
    If you Recycle the dummy unit you re-scale unit and effect during the effect death time.

    Code (vJASS):
                call SetUnitVertexColor(u, 255, 255, 255, 255)
                call SetUnitScale(u, 1, 0, 0)


    I mention this, because I really like MissileRecycler, since you avoid fireing onIndex/onDeindex events unlike Nestharus Dummy does.
     
  20. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,772
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    I have added a function called "RecycleMissileDelayed" which uses a TriggerSleepAction and the user can specify how long to wait for the animation to complete. I recommend 2 seconds in case the TSA is inaccurate.