Fade's hit area.

PapayasPapayas Join Date: 2010-07-01 Member: 72219Members
<div class="IPBDescription">Ideas for the fade.</div>Currently, the fade can not hit that well. I struggle to actually get any hits on someone when I am using fade's First attack.

I am guessing that you have to get your aimer on the Marine perfectly in order to get the hit but what about if:

The fade's hitting was like an actual slice.

What I mean by this is that:

<a href="http://img862.imageshack.us/i/fadeattack1.png/" target="_blank"><img src="http://img862.imageshack.us/img862/4443/fadeattack1.png" border="0" class="linked-image" /></a>

This picture means that the Grey is where you can land a hit. It basically resembles an actual slice instead of 1 area where you can hit. It makes it easier for the fade to land a hit and makes it more realistic. If you don't understand then just say and I will try to add more detail.


And here is the hitting area for the Second Attack:

<a href="http://img197.imageshack.us/i/fadeattack2.png/" target="_blank"><img src="http://img197.imageshack.us/img197/9051/fadeattack2.png" border="0" class="linked-image" /></a>



This picture is the same again but for the Second Attack. The one hit kill one. The fade's second attack is a slash downward from both of the blades(?) at the same time.

I hope you understand this. If you don't just say. I can't explain this that well.

Comments

  • HarimauHarimau Join Date: 2007-12-24 Member: 63250Members
    What basis did you use for those grey polygons?
  • FehaFeha Join Date: 2006-11-16 Member: 58633Members
    I dont understand the math behind this, could you please show it?

    I do agree on a slice tho, but is it maybe possible to use the actuall claws collision for it (so if you hit, you hit, aswell as it would dmg all macs in a mac spam)?
  • lunsluns Join Date: 2010-12-05 Member: 75502Members
    the hitbox of the fade needs to be increased, same with skulks. being kitted by sprinting marines isn't so great although its fun when I'm doing it, lol.
  • PapayasPapayas Join Date: 2010-07-01 Member: 72219Members
    <!--quoteo(post=1836992:date=Mar 13 2011, 05:21 PM:name=Harimau)--><div class='quotetop'>QUOTE (Harimau @ Mar 13 2011, 05:21 PM) <a href="index.php?act=findpost&pid=1836992"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->What basis did you use for those grey polygons?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Eh?
    I made this in Paint...
    I didn't think of any maths or anything behind it...

    <!--quoteo(post=1836994:date=Mar 13 2011, 06:20 PM:name=Feha)--><div class='quotetop'>QUOTE (Feha @ Mar 13 2011, 06:20 PM) <a href="index.php?act=findpost&pid=1836994"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I dont understand the math behind this, could you please show it?

    I do agree on a slice tho, but is it maybe possible to use the actuall claws collision for it (so if you hit, you hit, aswell as it would dmg all macs in a mac spam)?<!--QuoteEnd--></div><!--QuoteEEnd-->

    There is maths behind this?

    The grey is basically the hit box that I think it should be increased to. I think they are also going to limit mac spam so it is only a few Macs to build stuff not sure though. Mac spam is a problem.
  • KuBaNKuBaN Join Date: 2002-11-16 Member: 8979Members, Constellation
    +1. Assuming the hurtboxes for melee work the way you are guessing (and playtesting seems to indicate this), this definitely needs to be changed.

    Also...
    <!--quoteo(post=1837013:date=Mar 13 2011, 06:06 PM:name=Papayas)--><div class='quotetop'>QUOTE (Papayas @ Mar 13 2011, 06:06 PM) <a href="index.php?act=findpost&pid=1837013"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I think they are also going to limit mac spam so it is only a few Macs to build stuff not sure though. Mac spam is a problem.<!--QuoteEnd--></div><!--QuoteEEnd-->
    wut?
  • HolyTealHolyTeal Join Date: 2011-03-09 Member: 85427Members
    The ability to do extra damage when blinking behind a lonely marine with fade could be a good add too.
  • FehaFeha Join Date: 2006-11-16 Member: 58633Members
    edited March 2011
    <!--quoteo(post=1837013:date=Mar 13 2011, 11:06 PM:name=Papayas)--><div class='quotetop'>QUOTE (Papayas @ Mar 13 2011, 11:06 PM) <a href="index.php?act=findpost&pid=1837013"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->There is maths behind this?

    The grey is basically the hit box that I think it should be increased to. I think they are also going to limit mac spam so it is only a few Macs to build stuff not sure though. Mac spam is a problem.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Obviously there is math behind it, along with nearly any other intersection math (the only exceptions using logic instead, which can be argued to be math anyway).

    I can think of 2 ways to do what you want.
    One is that you translate the entities into 2d shapes and check intersection with your diamond shapes, and the areas that intersect is then used on target entity to find closest point on target that was hit, and check if it was close enough to be a hit. This would probably act odd, be overly advanced to do and just is not smart.
    The second is to instead use some sort of 3d shape that is similar to what you want, and check what it collides with. This should be simpler and better than the first way.

    I still think that the best thing would be if you used the collision of the fades actuall claws to see what you hit, and maybe add that if you hit a wall a sort of bounce animation starts, that cancels the attack as you hit a wall.
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    edited March 2011
    relevant code, gotta figure out the AttackMeleeCapsule function next, i'll get back to you.

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Trace melee attack
            local didHit, trace = self:AttackMeleeCapsule(player, SwipeBlink.kDamage, SwipeBlink.kRange)
            if didHit then

                local hitObject = trace.entity
                local materialName = trace.surface
                
                if hitObject ~= nil then
                
                    if hitObject:isa("Marine") then
                        Shared.PlaySound(player, SwipeBlink.kHitMarineSound)
                    else
                    
                        // Play special bite hit sound depending on material
                        local surface = trace.surface
                        if(surface ~= "") then
                            Shared.PlayWorldSound(nil, string.format(SwipeBlink.kScrapeMaterialSound, surface), nil, trace.endPoint)
                        end
                        
                    end
                    
                end
                
            end<!--c2--></div><!--ec2-->

    edit: here's the capsule code:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function Weapon:AttackMeleeCapsule(player, damage, range)

        local viewOffset = player:GetViewOffset()
        local startPoint = viewOffset + player:GetOrigin()
        local endPoint   = startPoint + player:GetViewAngles():GetCoords().zAxis * range

        // Trace using a box so that unlike bullet attacks we don't require precise targeting
        local extents = Vector(0.4, 0.4, 0.4)
        
        local filter = EntityFilterTwo(player, self)
        local trace  = Shared.TraceBox(extents, startPoint, endPoint, PhysicsMask.Melee, filter)

        if trace.fraction < 1 then
        
            
            if Server then
                local direction = (trace.endPoint - startPoint):GetUnit()
                self:ApplyMeleeHitEffects(player, damage, trace.entity, trace.endPoint, direction)
            end
            
            TriggerHitEffects(self, trace.entity, trace.endPoint, trace.surface)
            
        end
        
        return trace.fraction < 1, trace
        
    end<!--c2--></div><!--ec2-->
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    edited March 2011
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    The range of the fade attack just needs to be increased.
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    <!--quoteo(post=1837119:date=Mar 14 2011, 02:31 PM:name=ScardyBob)--><div class='quotetop'>QUOTE (ScardyBob @ Mar 14 2011, 02:31 PM) <a href="index.php?act=findpost&pid=1837119"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The range of the fade attack just needs to be increased.<!--QuoteEnd--></div><!--QuoteEEnd-->

    would that be necessary if the fade were faster than a marine?

    i think the ranges were supposed to be based on the animation so it's more realistic. i think we just need less lag and faster aliens (celerity)
  • ShiloriusShilorius Join Date: 2011-01-14 Member: 77445Members, Reinforced - Shadow
    In my opitinon in addition the stab should do more damage too.
    In the earlygame it is a instand kill..
    in the endgame... not.

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Light armour Marines gain a lot of effective HP with each level of armour upgrade (+20 armour = +40 HP).

    So Marines gain 25% extra HP (of base 160) per level of armour, while aliens only gain 10% extra damage with each level of attack.

    By end game, a light armor Marine has 280 HP effectively, vs Fade's Stab, which deals 208 damage (160 base x 130%).<!--QuoteEnd--></div><!--QuoteEEnd-->
    (<a href="http://getsatisfaction.com/unknownworlds/topics/fade_stab_one_hit_kill" target="_blank">Source</a>)
  • l3lessedl3lessed Join Date: 2010-06-07 Member: 71977Members
    edited March 2011
    Ok. I worked for a while on the mod Age of Chivalry, which used all melee weapons. Before we go any further, let me state that I have not looked into the NS2's game code or the way they handle hit detections. With that out of the way, HL2 used a ray trace system, if that is even the correct term, where when you attacked the game shot out a defined ray in a direction. The engine calculated if that ray hit any one and ran the appropriate damage, animations, and so on. This worked great for a game like HL2 where you are dealing almost exclusively with guns because you only need to trace the straight linear path of one bullet at a time, but when it came to melee code it got a lot more sticky, as you could tell if you ever played Viking, Pirates, and Knights mod before they devised there improved hit detection system.

    This becomes a problem when you're dealing with melee weapons because, unlike a gun, melee weapons need to trace a full path from the beginning of a swing to the end. When dealing with a gun you just need the single ray to trace what would be the projection of a bullet. To deal with this in Age of Chivalry, we set up a system in which a script file was loaded for each weapon. In this script file was a series of rays with the time they should appear, their place, and their range. This allowed each weapon to have a programmed series of rays that followed the path of the weapon animation. It was exhaustive and time extensive as you had to program each one in manually, and some times you would have 60+ rays in a single animation to hand input into the script file; I remember the hours spent putting the numbers in, checking them, tweaking them, checking them again, and so on. Some other problems encountered was trying to get the third person and first person animations aligned so that the ray trace pattern would sink up with your view of the attack animation and other players people viewing your third person models attack animation.

    It seems for melee weapons NS2 uses ray trace system coupled with some sort of box hit detection.

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> // Trace using a box so that unlike bullet attacks we don't require precise targeting
        local extents = Vector(0.4, 0.4, 0.4)
        
        local filter = EntityFilterTwo(player, self)
        local trace  = Shared.TraceBox(extents, startPoint, endPoint, PhysicsMask.Melee, filter)<!--c2--></div><!--ec2-->

    This is interesting. I wonder how the boxes are exactly originated, how big they are, and if they follow the animation or they just appear and anyone in them gets damaged. If they don't follow the path of the animation and just appear for the split second you push the attack button this could cause confusion between the animation and the player because then you could swing and miss when the box appeared, but then a split second later have the animation seem like it should of hit.

    One side note. A problem can appear if the attack animation is too fast because the hit rays can only originated as fast as the server tick rate causing the rays to lag behind the client side animations. With Age of chivalry they had to come up with a system in which multiple rays are calculated in a single server tick and then projected when the client received the server tick information. This allowed for a more three dimensional projection of the attack instead of a very linear one dimensional line that followed the weapon.

    Hopefully I'm not just spouting irrelevant information, and you can use some of this to your advantage.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    edited March 2011
    <!--quoteo(post=1837139:date=Mar 14 2011, 12:14 PM:name=l3lessed)--><div class='quotetop'>QUOTE (l3lessed @ Mar 14 2011, 12:14 PM) <a href="index.php?act=findpost&pid=1837139"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Ok. I worked for a while on the mod Age of Chivalry, which used all melee weapons.<!--QuoteEnd--></div><!--QuoteEEnd-->

    squeeeeeeeeeeeeeeeeeeeeeeeeeee

    Yeah, the videos showing how the rays worked and stuff were amazingly awesome in AoC.

    Personally, I wouldn't mind the brain-dead box of NS1 (generates a bunch of rays in a cone on attack, see if hit, animation is just for kicks), but if we could get fancy with a more detailed melee hit system that would be way awesome.
  • blackholedreamsblackholedreams Join Date: 2004-02-04 Member: 26023Members
    I had always wanted this for NS1; it'd be nice to see realistic melee hit detection in NS2.
  • FehaFeha Join Date: 2006-11-16 Member: 58633Members
    Whats up with the necromany? :S

    Anyway, I think that firing traces from a list with different delays is a bad idea for several reasons.
    You have to tweak this list a lot to make it work correctly, and then when it does, you are pretty much limited to that animation, if you ever change it, you will have to redo it all again.

    Instead I think somehow using the collision hook for the weapon might be a better idea, the problem is that the weapon is part of the player model, and i am not sure if it even has collisions at all (arent players just a capsule atm?). If we somehow could use the actual model for collisions tho, and check if the collision was for the actual blades, then using that hook would work nicely. They only problem would be how prolonged hits would work compared to those that only hits once (I think only being able to hit each thing once per attack would make most sense).

    I think the easyest (apart from firing a single normal line trace) way to do it though (and therefor also the best) would be a simple cone trace, like the skulk does.
  • rhysjones81rhysjones81 Join Date: 2007-10-05 Member: 62548Members, Reinforced - Shadow
    The only thing I can see about having the ray, is that it may (if in range) hit multiple marines with one swipe, now, I know this is what would happen if this were all real, if you shoot a guy in the face the bullet passes through and hits the guy behind too, but it could make it immensely easy for a fade to rip whole squads to ribbons without really being the intent.

    The old NS1 fade hit was of course just a cone or whatever, and if two marines were inside of it, it would hit one and even when playing alien, it sort of felt fair.

    Do we really want to have the fade become a complete rapist? surely it would make them more of an assault character than a hit and run?
  • HarimauHarimau Join Date: 2007-12-24 Member: 63250Members
Sign In or Register to comment.