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.
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top