Fade's hit area.
Papayas
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.
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
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)?
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.
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?
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.
<!--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-->
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)
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>)
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.
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.
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.
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?