Welcome, Guest. Please login or register.
Did you miss your activation email?
September 01, 2014, 09:59:58 pm

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The RC3 Client is out now! Download it now!
178139 Posts in 10144 Topics by 16686 Members
Latest Member: afatsumlug
* Home Forum Wiki Help Search Login Register
+  Newerth Forums
|-+  Savage XR
| |-+  General Savage XR Discussion
| | |-+  INFO: How melee works.
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 Go Down Print
Author Topic: INFO: How melee works.  (Read 8916 times)
Daemon
Administrator
Legendary Member
*****
Posts: 3723


beware, for this is the everbroken...


View Profile
« on: May 09, 2012, 10:00:00 am »

Hello.

All throughout the years, there have been complaints about all kinds of unexpected and abnormal manifestations like misses and swingthroughs. Well, this is how melee impact is being calculated in Savage:



- Every model is defined by accurate, finely tuned bounding boxes, which change position with the model, along with the body movements.
- Spinning (turning) your unit has a natural maximum speed limit. You can't spin uncontrollably.
- The weapons have an 'active' tip, a collision detector box positioned at the sharp end.
- Movements are fluid and realistic, for instance gravity prevents the unnatural uphill leaping, and inertia does not allow sudden changes in direction.



- IMAGE 1: The vector of the weapon movement is calculated so that damage only occurs when the weapon hits an enemy while moving along the logical slashing path.
- IMAGE 2: Backhits are not possible (rotating the unit in the opposite direction of the movement of the axe, so that the weapon touches the enemy regardless).
- IMAGE 3: No collision, no damage. Weapons can fit between the enemy's body parts, leading to millimetric and realistic misses.

Isn't this a beautiful, natural, perfect, boring melee system?

___________________________________________________________________________

Well, scratch that Smiley. We've got none of that crap. We've got this:




We have a system that lets us spin like crazy, doing ten 360's per second, hit with the weapon moving away, don't worry about angle, inclination or which part of the weapon hits. We have uphill leaps, we can leap and bounce and change direction repeatedly and instantly. And what makes it really fun, is the ease of hitting, which would have been impossible without these HUGE, SIMPLE and FEW collision boxes. Who cares about realistic combat physics, this is a game!

So, each unit's hittable area is defined by a bounding box. Even though, surprisingly, in lego's and pred's cases, they're the same: 12 width, 12 length, 32 height, 50 melee range. What measure units these numbers are supposed to be, i don't know Tongue. Let's call them MU. I'll call the boxes around the units passive, and the ones in front of them, active.






The active box is a projection of the passive box with the length specified in the .object file of the given unit, inheriting its width and height. So, basically, the bigger the unit, the wider the active box. This box is the 'weapon'. Actually, the box is longer then the weapon, in most cases. To land a hit on an enemy, you need to have your melee box touching the enemy while the swing is active. Mohican made the crosshair turn red (the color can be changed btw) when the hit is active, meaning in its damaging period.

A swing is defined by a few parameters: duration, active window, combo time etc. For instance the 1st melee swing of the pred looks like this: 2000ms from start to finish (returning to idle position, which can be interrupted if you continue the combo), the impact time is between 600 - 800ms (only 200ms!!), and after 666ms you can spam click so the next combo hit activates. Lego's has 2160ms duration, impact between 567-700ms (133ms!, one third less than pred's), and can continue the combo after 1333ms. So you see, you actually have a window of opportunity of LESS THAN A FIFTH OF A SECOND to make sure your hit (the active box) touches the enemy.

The actual, visible position of the unit doesn't affect the passive box at all. It still is the same, and still there, if you don't move the mouse, regardless of what your unit LOOKS like it's doing, or WHERE it is. This is the pred being idle, notice how it moves out of the box. If you would hit its back full on, it wouldn't count.



So the position of the body/weapon and the state of the animation does not affect collision detection. No matter what the animation shows, the active box will always point forward and only the mouse moving can change its position, not the animation. I've taken pictures of the frames defining the start and the end of the active periods of the swings, and you can see where they start and end visually.

Pred: 1. Widest extension of the arm back. 2. Frame when the hit becomes active. Notice the melee box is nowhere near the claw. 3. Last active frame. 4. The first frame after the swing loses damage status.


Lego: 1. The furthest position of the axe for building momentum. 2. The beginning of the active period. 3. A random frame during the time when the axe is in the active box. 3. The 1st frame after the active period is over.


This seems unfair, but while the pred's swing during the active period describes a full half a circle (180 degrees of motion), the lego's axe barely does 1 quarter (90 degrees).

As you can see in the images below, the weapon/claw can be completely inside the enemy, visually, and still have no effect. You MUST make sure the active box intersects with the enemy's passive box AT THE RIGHT TIME so you can land the hit.

Examples of valid hits: 1. Pred active box barely touching the lego passive box, but touching it nonetheless. A teensy bit more to the right than the (1) image from the No-Hit collage. 2. Pred hitting the lego the first instant the swing becomes active, even if his claw is very far away, like... Australia! 3. The absolute farthest you can be from the enemy when hitting. 4. Backhit. Pred 1st swing from his right to his left, away from lego, then pred moved to its right to intersect the lego's box long AFTER the claw moved away fro the lego. In fact, the swing is close to ending.


Examples of the boxes not intersecting, even if the pred claw is seriously going through the lego, visually: 1&3. Boxes not touching doing 1st swing. 2. Boxes not touching while claw is in the lego box when doing 2nd swing.


It's not all good, tho. The length of the active box, even though it makes the game nicer by not having to be right next to your enemy to hit, has a downside: it can hit through stuff like props or other units. 1. Normal every-day hit. 2. Hit through a tree. 3. Three legos easily fit inside the active box of a pred. 4. Hitting 3 legos at once.


As you know, the most fun to play and hit with are the units with wide animations, with a horizontal, sweeping melee motion. That allows you to SEE when the tip of the weapon hits the enemy and time your swings. That's why the shaman's hammer hit is hard to aim because it has a downward motion - no side view, hard to predict, and the addition of a 2nd horizontal combo hit to the shaman in Evolution makes it easier for him to land shots. That's why the scavenger players tend to hit away from the unit, not in front of it, to follow natural sword motion, outwards, but the collision box is EXACTLY THE SAME. The animation illusion also makes stalker players rarely hit to their sides, but in front of them, where the claws are.

So these bounding boxes and the hit trace system are unchanged in Savage from the dawn of time. The melee collision 'detector' is not a line, it's not the the tip of the weapon, and it's not a tapered box.  It's this bigass right angled box as wide as the bounding box of the unit and 5 times as long. That makes it easy to hit, a precise system like the fake one i presented in the beginning would be REALLY frustrating and dull. Anything we would do to change and refine this will only make it WORSE! Every single hit will be harder to land. Anyway, since Mohi added melee interpolation between server frames, swingthroughs simply cannot happen. If it does, it's only in your head! Smiley

I hope you managed to read it all the way, and i'll think about adding some duel vids with the bounding boxes on. BB!
« Last Edit: September 24, 2012, 03:28:04 pm by Django » Logged


My black list: Mein (hax0r, troll), Slayer (multiclanner), biggeruniverse (XR thief, troll), Robbo (thug and liar), Thrill (junkie)
Moxy
Newerth Donator
Super Hero Member
*****
Posts: 1787



View Profile WWW
« Reply #1 on: May 09, 2012, 10:35:03 am »

tnx for the explanation. i do question if there is any chance if changing it to the top system, because it would be so much better, but since you know of all this, and i suspect that u have known it for a while, its simple not possible to change, or just to much damn work to do, or it will have some unkown side effects. all in all, well made post and easy to understand now.

you know thrill wont stop moaning though Tongue
Logged

Hakugei
Newerth Donator
Legendary Member
*****
Posts: 3310



View Profile
« Reply #2 on: May 09, 2012, 11:01:55 am »

Essentially, you'd be changing Savage into something else.
It would be different, perhaps even very different. (Let alone the cost of performance would increase, which everyone is always so whiney about. Wink )


Good job on the detailed report, Daemon. :p
Logged
lololol
Newerth Referees (EU)
Full Member
***
Posts: 147


View Profile
« Reply #3 on: May 09, 2012, 11:17:02 am »

good pictures Deamon! great job! Smiley
Could you add some info about such parameters as "ping", "net BPS","net frame per second"  and "max packet size"? how they work together with hit boxes? I mean, dynamic of melee is even more interesting. Seems to be a manipulation with net parameters is a most popular way to cheat melee... and maybe necessary to set a min and max for net parameters to avoid cheats?
Logged

H3027
DarkStar fan
Administrator
Super Hero Member
*****
Posts: 2300



View Profile
« Reply #4 on: May 09, 2012, 11:50:06 am »

Thanks for the explanation, Daemon!

You forgot to add the impact of server FPS on the combat though.

20 server fps (default these days) means 1 FPS every 50 ms.
These relatively low fps are the perfect prevention of 5000 degree spin blocking and hitting. While they do still work, they are too unrelayable to be effective.
What it also nerfs is the aesthetically inferior "Parkinson Melee Style" (super high mouse sens).
If you spin fast you're very likely to miss, 200 ms attack tag = only 4 server fps.


tnx for the explanation. i do question if there is any chance if changing it to the top system, because it would be so much better, but since you know of all this, and i suspect that u have known it for a while, its simple not possible to change, or just to much damn work to do, or it will have some unkown side effects. all in all, well made post and easy to understand now.

you know thrill wont stop moaning though Tongue

The reason why the system above wouldn't be better for the combat system of Savage, can be found out by using human imagination:

In order to perform a backstab you have to FLANK  your opponent.
If the hitboxes aren't generic (as we have them now), but animated and constantly active - then you naturally can't flank your opponents at any given time and as closely as you can now. Which is crucial.
The combat would be less fast paced and more stamina intensive (as you have to keep higher distance from the side to flank), there would be less leaping tricks possible. Furthermore the opponent could easily block you mid leap during the flanking without actually standing in front of you (because your retarded hit boxes move and stick out everywhere and are constantly vulnerable to be blocked from any side). Charge-block, charge-block etc.

This all would work if you removed the racial asymmetry (as in Savage 2, Rune or any other melee based game). But since Savage is unique, why changing it into something generic and less fun?
« Last Edit: May 09, 2012, 11:53:22 am by H3027 » Logged

Daemon
Administrator
Legendary Member
*****
Posts: 3723


beware, for this is the everbroken...


View Profile
« Reply #5 on: May 09, 2012, 11:55:11 am »

Thanks for the explanation, Daemon!

You forgot to add the impact of server FPS on the combat though.

Well, the point of the explanation is how the bounding boxes dictate impact. The network aspects like those lololol or you mention, should and can be treated separately from this 'gameplay' analysis, because they don't affect only melee, but ranged weapons and everything else. Be my guest Tongue.
« Last Edit: May 09, 2012, 11:57:18 am by Daemon » Logged


My black list: Mein (hax0r, troll), Slayer (multiclanner), biggeruniverse (XR thief, troll), Robbo (thug and liar), Thrill (junkie)
darkbread
Administrator
Super Hero Member
*****
Posts: 1271


a lump of bread, that is of a dark color...


View Profile
« Reply #6 on: May 09, 2012, 12:29:46 pm »

Thanks for that! Now I dont have to (╯□)╯︵ ┻━┻ in duels anymore. Before this explanation it didn't make any logical sense to me that a hit of my claw/axe did not do any damage which made me quit the game  tongue
Logged

H3027
DarkStar fan
Administrator
Super Hero Member
*****
Posts: 2300



View Profile
« Reply #7 on: May 09, 2012, 12:38:58 pm »

Ex2 had a variable that you could activate in devworld mode that showed the hitboxes.
Would it be possible to add such a visual indication for (tutorial-)demos or devworld?

Or maybe there are other ways to inform newbies about it, like a screenshot in the tutorial section. Smiley
Logged

Faun
carn =/= hax
XR Developer
Hero Member
*****
Posts: 924


Hear a flute in the forest...


View Profile
« Reply #8 on: May 09, 2012, 02:41:48 pm »

I always wondered how collisions are controlled in savage - It was quite clear that it has nothing to do with the shape that is represented by the animations. One could go that far and display all these shiny boxes and planes in savage without model & terrain textures, to show how 'virtual' all those fancy graphics are and how much we play a game with little boxes running between bigger boxes.  grin

Daemon thanks a lot for your explanation!

Logged

MrEvilDr
I hate you, give me one!
Sr. Member
****
Posts: 407

t('-'t) <--- Kirby


View Profile
« Reply #9 on: May 09, 2012, 02:59:50 pm »

Such a simple system, and should be so easy for people to understand without the need for a detailed explanation such as this. However, if anyone whines about duelling, simply throw a link to this thread in their down their gut! Job done! Cheers Daemon afro
Logged

H3027
DarkStar fan
Administrator
Super Hero Member
*****
Posts: 2300



View Profile
« Reply #10 on: May 09, 2012, 03:23:29 pm »

I do think it needs an explanation somewhere. New people don't have the same attention span as we did when the game was more popular. Furthermore it removes early frustrations and helps to improve at melee faster without the help of tutorials.
Logged

Zackorrigan
Newerth Donator
Sr. Member
*****
Posts: 304


View Profile
« Reply #11 on: May 09, 2012, 10:40:41 pm »

thanks for this post daemon:)

Logged
H3027
DarkStar fan
Administrator
Super Hero Member
*****
Posts: 2300



View Profile
« Reply #12 on: May 09, 2012, 11:16:11 pm »

Screenshots I made in ex2 years ago:



Full size: http://www.abload.de/img/savage_hitboxesg9a18.jpg

Also, the attack box slightly increases in height when you look up or down.
This was implemented against head jumpers.
Logged

Daemon
Administrator
Legendary Member
*****
Posts: 3723


beware, for this is the everbroken...


View Profile
« Reply #13 on: May 09, 2012, 11:20:21 pm »

Also, the attack box slightly increases in height when you look up or down.
This was implemented against head jumpers.
It's fixed now, afaict.
Logged


My black list: Mein (hax0r, troll), Slayer (multiclanner), biggeruniverse (XR thief, troll), Robbo (thug and liar), Thrill (junkie)
MrEvilDr
I hate you, give me one!
Sr. Member
****
Posts: 407

t('-'t) <--- Kirby


View Profile
« Reply #14 on: May 10, 2012, 01:40:50 am »

I do think it needs an explanation somewhere. New people don't have the same attention span as we did when the game was more popular. Furthermore it removes early frustrations and helps to improve at melee faster without the help of tutorials.

What I mean to say is that it's sad that it's come to this undecided
Logged

Pages: [1] 2 3 4 Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.04 seconds with 19 queries.