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.
  • Ghan Ghan:
    Howdy
  • 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 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