Spell FarSightBJ

Bribe

vJass errors are legion
Reaction score
67
Fair enough.

Then I don't get why you are not using just using a customized dust of appearance, plus a fogmodifier. Because the dust of appearance sets a unit detected without making it completely visible.

You could make a dust of appearance with max predicted radius, for example, with a custom buff. And pick all units in that radius and remove the buff if they are not in the dynamic range. That's one, simple way to do it.

Although it still would not be modular enough to be a system, it could at best be a spell.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Ok an update:

1. Now uses a multiplayer compatable/sync TSA aka PolledWait with nulled timer.
2. Also uses the proposed method by Bribe for invisible detection [tnx =) Bribe] and his optimization for only creating 1 rect and just "spamming"/using SetRect.
3. It now uses 1 xecast instance which could be thought as an optimization as well.
 

Bribe

vJass errors are legion
Reaction score
67
You do this whole thing completely overkill and it bugs.

Dust of Appearance with collision 32 could affect flying air units above, for example.

Is its buff really hardcoded? That's quite depressing. So even removing the buff from unwanted units == false.

You don't need a region and a bunch of rects in this, better to just use a periodic group enum check, say every 0.5 seconds should be enough for this one.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Bribe:
1. Dust of Appearance with collision 32 could affect flying air units above, for example.
2. You don't need a region and a bunch of rects in this, better to just use a periodic group enum check, say every 0.5 seconds should be enough for this one.
3. So even removing the buff from unwanted units == false.
4. You do this whole thing completely overkill and it bugs.

1. Well after a copy of Dust of Appearance ability is made it's pretty easy to change the targets allowed.
2. I don't think so. It would be inaccurate and slower.
3. I've never seen the detected buff being used in any UMS map, so I don't think this is a problem.
4. Bugs?
 

Bribe

vJass errors are legion
Reaction score
67
Note that "bugs" came right before saying how the AoE will be able to hit air units above it. But now that I think of it this is not such a problem.

I don't know where you get the idea that your way is faster. Periodic group enum with a FirstOfGroup loop every 0.5 seconds is pretty efficient, uses no pointless regions, rects, triggers, conditions, and does not need to remove/destroy any of them, making it wicked light on RAM as well. If you are worried about the accuracy even with something as easy and infrequeent as a simple "reveal" then lower the timer a little bit.

This isn't wc3c.net where you need to use huge bulky waste of space systems to do a simple cast, you could use DummyCaster by Jesus4Lyf, for example, which fits better for TheHelper.net people.
 

Dirac

22710180
Reaction score
147
Offtopic:
Out of plain curiosity, is it FirstOfGroup really faster than common ForGroup or EnumGroup calls? are unit arrays even more faster than groups?
 

Bribe

vJass errors are legion
Reaction score
67
ForGroup and Enum filters open up new threads, and new threads are incredibly expensive operations. If you insist on using a filter or a for group or a FirstOfGroup loop, then choose one of the three. But FirstOfGroup is best because it gives you access to locals without re-declaring them, does not open up a new thread...

We do need some FPS benchmarks to show the speed difference, however.
 

Dirac

22710180
Reaction score
147
Benchmark Time (groups with 8 units inside)
JASS:
scope Tests
    // 24 - 27 fps
    private struct Main extends array
        private static method period takes nothing returns nothing
            local group g
            local unit u
            local integer i=150
            loop
                exitwhen 0==i
                set g=CreateGroup()
                call GroupEnumUnitsInRange(g,0,0,600,null)
                loop
                    set u=FirstOfGroup(g)
                    exitwhen null==u
                    call GroupRemoveUnit(g,u)
                endloop
                call DestroyGroup(g)
                set i=i-1
            endloop
            set g=null
            set u=null
        endmethod
        private static method onInit takes nothing returns nothing
            call TimerStart(CreateTimer(),0.005,true,function thistype.period)
        endmethod
    endstruct
endscope
JASS:
scope Tests
    // 5 fps - crashes
    private struct Main extends array
        private static method enum takes nothing returns boolean
            return false
        endmethod
        
        private static method period takes nothing returns nothing
            local group g
            local integer i=150
            loop
                exitwhen 0==i
                set g=CreateGroup()
                call GroupEnumUnitsInRange(g,0,0,600,Filter(function thistype.enum))
                call DestroyGroup(g)
                set i=i-1
            endloop
            set g=null
        endmethod
        private static method onInit takes nothing returns nothing
            call TimerStart(CreateTimer(),0.005,true,function thistype.period)
        endmethod
    endstruct
endscope
Proof that FirstOfGroup is actually faster
 

Bribe

vJass errors are legion
Reaction score
67
That looks pretty reasonable, logically.

I wonder what it would be like for a lower number of units? I'm sure it'd be consistently faster though.
 

tooltiperror

Super Moderator
Reaction score
231
No.

I see no reason to use this over Far Sight ability, and maybe some triggered enhancements. For your Day/Night Dilemma, you can use 2 different abilities and swap them at day and night. This library is massive overkill, and "BJ", as Dirac pointed out, is Blizzard Jass.

Graveyarded.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    where did you go?
  • The Helper The Helper:
    Jefferson TX on a Paranormal Investigation of a haunted bed and breakfast - I got some friends that are paranormal investigators and they have an RV and do YouTubes
    +1
  • The Helper The Helper:
    It was a lot of fun. The RV was bad ass
  • jonas jonas:
    That sounds like fun!
    +1
  • The Helper The Helper:
    it was a blast!
  • The Helper The Helper:
    I am going to post the Youtube of the investigation in the forums when it is ready
    +1
  • jonas jonas:
    cool!
  • vypur85 vypur85:
    Sounds cool TH.
  • tom_mai78101 tom_mai78101:
    I was on a Legend of Zelda marathon...
  • tom_mai78101 tom_mai78101:
    Am still doing it now
    +1
  • jonas jonas:
    which one(s) are you playing?
  • jonas jonas:
    I played a little bit of the switch title two weeks ago and found it quite boring
  • The Helper The Helper:
    just got back from San Antonio this weekend had the best Buffalo Chicken Cheesesteak sandwhich in Universal City, TX - place was called Yous Guys freaking awesome! Hope everyone had a fantastic weekend!
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • The Helper The Helper:
    We have been getting crazy numbers reported by the forum of people online the bots are going crazy on us I think it is AI training bots going at it at least that is what it looks like to me.
  • The Helper The Helper:
    Most legit traffic is tracked on multiple Analytics and we have Cloud Flare setup to block a ton of stuff but still there is large amount of bots that seem to escape detection and show up in the user list of the forum. I have been watching this bullshit for a year and still cannot figure it out it is drving me crazy lol.
    +1
  • Ghan Ghan:
    Beep boop
    +1
  • The Helper The Helper:
    hears robot sounds while 250 bots are on the forum lol
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    and then it was Thursday...
    +2
  • tom_mai78101 tom_mai78101:
    And then Monday
    +1
  • The Helper The Helper:
    I got the day off today!
    +1
  • tom_mai78101 tom_mai78101:
    How...? (T-T)
  • The Helper The Helper:
    I took the day off. I work for myself so I can do that.
    +1
  • Varine Varine:
    Well I'm already over summer

    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