YesNoOk
avatar

Tutorial Part 2 - Collision boxes (Read 29222 times)

Started by JustNoPoint, November 03, 2015, 09:18:02 pm
Share this topic:
Tutorial Part 2 - Collision boxes
#1  November 03, 2015, 09:18:02 pm
  • ******
    • www.justnopoint.com/

How Do I...? A M.U.G.E.N primer

Tutorial Part 2 - Collision boxes

M.U.G.E.N, Elecbyte (c)1999-2009
Updated 17 September 2009


Tutorial 1 | 2 | 3 | 4

Introduction

In this part, we will talk about how to define collision boxes for the animations in your character's .air file. The documentation for .air files is in air.html. It's a good idea to read it before proceeding with this tutorial.


1. About Collision Boxes

Once you have put together an animation for the character, you can use AirEditor to define collision boxes. There are two kinds of collision boxes:

  • Clsn1 - Attack box (red in color)
  • Clsn2 - Hit box (blue in color)
Simply put, if one of Player 1's attack boxes overlaps any one of Player 2's hit boxes, then it means Player 1 has hit Player 2.


2. Using AirEditor

AirEditor is a developer tool, and can be found in the old_tools/ directory of your M.U.G.E.N installation. The instructions for using AirEditor are in airedit.txt. When you are ready, run the airedit executable.

Go to File -> Open and choose the sff file you want to load, followed by the accompanying air file. You will now see your character on the screen:

AirEditor screen

Let's explain what you see on the screen.

  • The big window that you see your character displayed in is called the Display window. The title area shows the current animation action you are looking at, as well as the sprite number of the sprite shown.
  • The Info window at the upper-left shows:
    • X,Y coordinates of the cursor, which is displayed as a crosshair in the display window
    • X,Y position of the axis of the sprite, relative to the upper-left corner of the sprite. This is the number you entered in the player-sff.def file used to generate the SFF
    • Coordinates of the two opposing corners of the box you create when you drag the cursor on the display window
  • The Navigation window:
    • Current action being displayed. You can scroll through the animation actions in your .air file by pressing the arrow buttons on either side, or you can enter it manually by clicking on the middle button
    • Current element of the action that is being shown. You can scroll through the available elements, or manually enter it, just like the action
    • Click "Play Anim" to preview the animation
  • The Collision boxes window:
    • There are buttons here to let you set the bounding boxes for the current animation element
  • The Options window:
    • A toggle button to enable/disable display of the Clsn1 (attack) box
    • A toggle button to enable/disable display of the Clsn2 (hit) box
    • A toggle button to enable/disable display of the sprite's axis
  • The wide grey box at the very top of the screen beside the menu is the Status bar, which shows you some information, such as your last menu action.
  • At the bottom of the screen you see a row of Save boxes. Each of these represents a slot that you can save a box into. The clear button erases them all.

To define a collision box, simply drag the mouse cursor over the region you want to create a box at. This will be displayed as a bright green box. Click without dragging to make the green box go away. Let's start by defining boxes for KFM's standing frame. First, we'll drag a box to represent his body.

Boxes1 Boxes2

Click on the Save1 button at the bottom of the screen to save that box to memory. Now drag a second box for the head and click on Save2 to save that. Notice how the saved boxes appear in a darker color. If you want to go back and correct one of the saved boxes, simply drag a new green box.

Next, you assign the set of boxes to the current animation element. Click on the corresponding "Set" box in the Collision boxes menu. Repeat the procedure for all the elements in the animation action.

When you are done with your changes, remember to save your .air file. Click on the File menu and choose Save.


3. General Tips

  • You can quickly load your character by specifying the .sff and the .air filenames at the prompt. For example,
    airedit chars/kfm/kfm.sff chars/kfm/kfm.air
  • If you have a lot of frames using the same set of boxes, you can scroll through each element, saving the boxes to the .air file without clearing the boxes each time. Alternatively, you can set the collision box as "Default" to define a default set of boxes for each frame within an action. Click on the "Options" Read air.html for more information on default collision boxes.
  • In common cases, try to keep Clsn2 boxes within your Clsn1 boxes. The reason for this is so that it becomes possible to trade hits between players. If you have a Clsn1 box without a Clsn2 box in it, then setting priorities on attacks becomes meaningless, as the attacks would have infinite priority that way.
  • Don't be too detailed with your collision boxes. The point is not to make a pixel-accurate representation of the character, but to make one that is game-friendly. For example, boxes for your character on the ground should have Clsn2 boxes that span the space between both legs. In this case, too much detail is actually undesirable.

    Here is a picture of a one that is too detailed. You want to avoid this.
    Too much detail

    This next one has a better set. Not only does it take less effort to create, but it better approximates the movement of the character over time. Also, there is less chance that a Clsn1 box from an attack would slip through a gap.
    Just right



Tutorial 1 | 2 | 3 | 4

Next is Tutorial Part 3


ADDITIONAL NOTES:
The current recommended program to make MUGEN content is Fighter Factory.
You can find it here
Last Edit: November 03, 2015, 09:51:38 pm by Just No Point
Re: Tutorial Part 2 - Collision boxes
#2  November 04, 2015, 08:57:30 pm
  • ******
  • [E]
    • Mexico
this is the one that needs notes because of infinite priority; in real games, infinite priority exists and works well but/adn a magic priority number does not exist.
Re: Tutorial Part 2 - Collision boxes
#3  November 05, 2015, 05:47:54 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I see little purpose to this. It talks about air editor which NOBODY really uses. So it's not describing anything that's going to make sense to most new people.

The very last paragraph is useful. The rest should really be consigned to history at this point. Fighter Factory's ability to make clsn boxes is so far superior to this, posting a tutorial on it is silly.

Or you could start the whole thing with "Deprecated" and you'd be all right.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Tutorial Part 2 - Collision boxes
#4  November 06, 2015, 07:18:41 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
perhaps it may be wiser to rewrite the first post and focus on the clsn theory basics and links to the different options we currently have to display hitboxes in commercial games and how to extract them (LUA scripts, debug bios, secret menus, specific custom tools...)
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Tutorial Part 2 - Collision boxes
#5  November 06, 2015, 11:09:27 am
  • ******
    • www.justnopoint.com/
Yeah I think I'll "remake" this with that info and using FF instead. Just put a disclaimer that this current tutorial is still here for completions sake.


A discussion stemmed from this post due to the image of CLSN shown below is being split to this thread.
Last Edit: November 17, 2015, 04:38:41 am by Just No Point
Re: Width (SCTRL)
#6  November 15, 2015, 09:08:37 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Please update your post with better CLSNs for Ryu because I really don't think people should be taught that that type of design is OK because that largely causes issues like the one you're describing.
Re: Re: Width (SCTRL)
#7  November 15, 2015, 09:54:07 pm
  • ******
    • www.justnopoint.com/
I considered saying something about that too but didn't know if I should turn the thread into a proper CLSN thread.

Odb, if this is from your Ryu please allow me and to update your CLSNs :p
Re: Re: Width (SCTRL)
#8  November 16, 2015, 10:28:16 pm
  • *****
  • Shame on you!
    • USA
lol my Ryu's never had problems with his/my clsns. Not once.
I actually edited the clsn boxes so you could see the lines a little better for these images.
It's hard to see the width line when the blue box is lined up on top of it. I was even thinking about dropping back to 480 to make the line a little clearer.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Re: Width (SCTRL)
#9  November 16, 2015, 10:43:41 pm
  • ******
    • www.justnopoint.com/
I'm sure it doesn't hurt your push any it's just "bad" CLSN making that probably shouldn't be shown as good examples in the Class. A stance should only have 2 or 3 CLSN boxes at most. Even the outdated character tut from the docs shows this is bad :P
Re: Re: Width (SCTRL)
#10  November 16, 2015, 11:54:48 pm
  • *****
  • Shame on you!
    • USA
Why? Why cant mugen handle more than 3 hitboxes?
vVv Ryuko718 Updated 10/31/22 vVv
Re: Re: Width (SCTRL)
#11  November 17, 2015, 12:15:47 am
  • ******
    • www.justnopoint.com/
  • Don't be too detailed with your collision boxes. The point is not to make a pixel-accurate representation of the character, but to make one that is game-friendly. For example, boxes for your character on the ground should have Clsn2 boxes that span the space between both legs. In this case, too much detail is actually undesirable.

    Here is a picture of a one that is too detailed. You want to avoid this.


    This next one has a better set. Not only does it take less effort to create, but it better approximates the movement of the character over time. Also, there is less chance that a Clsn1 box from an attack would slip through a gap.



    Not to mention that more CLSN data requires more processing power. It's not that MUGEN can't handle them it's just that they are deemed improper by fighting game standards for the most part.

    I'm not saying you HAVE to redo your CLSN boxes on your Ryu. I mean you can make them however you want TBH.

    But I think proper CLSN structure should be advocated in this board. That doesn't mean they have to be pixel accurate. Just that they shouldn't go more than 3 in most cases.
  • Re: Re: Width (SCTRL)
    #12  November 17, 2015, 12:33:04 am
    • ******
    • [E]
      • Mexico
    Why? Why cant mugen handle more than 3 hitboxes?

    60fps are very undetailed to represent proper real/fluid physics (even more so because fighting games animate even slower character frame wise); racing games go at 300 fps some even even 1khz for some things.
     since running a fighting game at that speed might be difficult (I am programming at 120 hz and certain thigns change a lot); fighting games like most other games for which this is a problem seetle for the next best thing, emulate fluid motion using clsns. if you have your legs apart and someone kicks the space between your legs from the front, even the tip of his leg lands  in between your legs, where there should be no contact in that position, for the front leg to get there it has to pass through yoru front leg, which should register a hit; one way to prevent the bug to happen is to extend the attacking leg's clsn so it cover the area which the feet travels; another is to put clsn in between both legs, since there's no way something will hti that place without hitting the front leg.
    Re: Width (SCTRL)
    #13  November 17, 2015, 04:00:27 pm
    • ******
    • Hedgehog Whisperer
    • Red Bull addict
      • Spain
      • xgargoyle.mgbr.net
    Having a Capcom character with wrong clsn is a big failure nowadays, something easily corrected with all the LUA hitbox viewer available out there
    XGargoyle: Battle posing since 1979
    http://xgargoyle.mgbr.net
    http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
    http://paypal.me/XGargoyle  <-- Donations welcome!
    Re: Tutorial Part 2 - Collision boxes
    #14  November 17, 2015, 04:09:09 pm
    • ******
      • www.justnopoint.com/
    I went ahead and moved your post here since the CLSN discussion makes more sense in the Collision boxes Tutorial thread.

    And while I totally agree that it's super easy to get accurate hit boxes now and people should be motivated to do so. It does require extra work to data mine them even if it's not hard.

    If a person doesn't feel like going through the trouble of doing that they shouldn't have to do so. But I do HIGHLY recommend them to study just a bit the rules of CLSN making by looking at examples and not make them over detailed like here at the very least.
    Re: Tutorial Part 2 - Collision boxes
    #15  November 17, 2015, 07:03:13 pm
    • *****
    • Shame on you!
      • USA
    I've only ever had slowdown because of Dragonclaw's ultras back on old winmugen/crappy pc days. Now with 1.0, it's hi-rez stages and a ton of explods. Not once has any amount of clsn boxes slowed mugen.
    Has anyone ever experienced slowdown because of clsn boxes? This is an honest question.

    My view of hitboxes and everything else that goes into a character is, 99% of the time a character is unique. We dont fight rectangles.
    I dont believe being able to attack Air, Hair, Fingers, or Toes, should be possible. If I could make a "green" box so you could "throw hair" I'd do that in a heart beat. Should you be able to punch hair and hurt the player?

    As for the hole in the legs. It'd be VERY hard to have an attack miss. A very specific chain of events would have to take place for KFM's width and attack to allow something between his legs. Well, this IS mugen. It could actually happen. there's 99,000 characters out there. But here's the thing; Imagine it happening in the battle. It's a one off; Unique. It may never happen again, but when it does, it'll be crazy accurate. Why is this bad?

    But lets go back to the big square representing what happens in the lack of animation vs movement. First, with the physics of the attack if I remember correctly, KFM slides forward a bit using only that frame of animation. Mugen wont forget to take into account the hitboxes until KFM stops moving... oh wait it never does. So the movement and filling in the gaps are actually done in game by mugen applying the movement. When KFM becomes stationary, Why should P2 be able to attack air??

    I dont see the benefit of fewer clsn boxes. Capcom hit boxes, SNK, MK, all of them are great for their own respective games. They work in the games because they dont fight Pop-Eye. They fight each other with standard boxes FOR THAT GAME. But they dont equal out when fighting vs other games.  I view the possibilities in mugen, the potential of mugen, to exceed any other fighter out there. Why dumb down?

    This is what you get for source.

    Cant punch Blanka in the face, The attack box for Dhalsim doesnt follow the path of the kick, Blanka can kick all that white, or if he was on the ground, do his long punch and hit the air under the leg. If Dhalshim was slow on the attack Blanka could also attack air on the backside.
    So why is Blanka's face unhitable? because he's jumping forward, or is he jumping backward in this frame? Can you tell? Should it matter? At this specific point in the action, you should be able to attack his head. BUT! Less clsn boxes are better? Source is perfect??

    This is my take on that instance

    One extra box for Blanka. How terrible is it guys?
    vVv Ryuko718 Updated 10/31/22 vVv
    Re: Tutorial Part 2 - Collision boxes
    #16  November 17, 2015, 07:12:33 pm
    • ***
    • MAX 330 MEGA PRO-GEAR SPEC
      • UK
    What's the point of a smack on the toes being enough to knock Blanka out of the air like it would.
    That box is also exactly the same during his entire jump animation covering slightly past his feet on the fully contracted frame, and helps serve the purpose of a jump to dodge certain attacks and projectiles. For whatever reason most air hurtboxes in SFA appear to be placed so the character axis is straight in the middle, regardless of what the sprite shows or characters where their pushbox isn't identcal.

    It's easier and quicker to do a couple of simple boxes to cover the general center of mass and leads to less weird situations and inconsistencies between characters of the same size, or animations in the same character where boxes are placed differently.

    Also the point of Sim's gigundo boxes is to offer a drawback to a character whos gimmick is free long range attachs with one button, in this case it rewards the Blanka that jumps over his foot allowing him ample space to hit his stretched out leg. Granted, the Marvel engine supports a fourth hurtbox to be used in attacks but that still covers only slightly less vertical space than it does in SFA for Dhalsim.

    Alpha 3 does have tiny red boxes, I won't contest that, but the same move in Alpha 2 has the same blue box but a larger red one that reaches slightly further and higher on the screen than the blue does. It doesn't let his thighs act as a deadly weapon though.
    Last Edit: November 17, 2015, 07:34:25 pm by The 100 Mega Shock!
    Re: Tutorial Part 2 - Collision boxes
    #17  November 17, 2015, 08:52:30 pm
    • *****
    • Shame on you!
      • USA
    If Blanka was moving forward and his feet are attacked, his trajectory would definitely be more affected than hitting center mass. It'd add a spin affecting near every positioning of his body. Back, Neutral, it'd add a spin to his body. Should Zangief not be able to grab his head, right shoulder, right forearm and hand, Right shin, and feet?? 7 viable points of attack.

    I agree that Dhalsim's entire thigh shouldnt be able to attack. What you're not seeing in my image is how my red boxes follow the movement. Depending on the attack I'll duplicate the same frame but bring the attack towards the end of the limb. Dhalsim's foot actually follows on the path of the thigh on the tangent. My red boxes display the movement when there is none.
    I believe in a fight, when an attacker punches, it's easier for you to get hit than attack the arm. The blue boxes should be a lot tighter than the red. You can kind of see that in Dhalsim. 

    As you just mentioned the same character, presumably using the exact same sprites, having different clsn boxes in different games, Which idea of the boxes is the best? Is it personal choice? Or are they based around that particular game's mechanics? Because this is Mugen, and should be using Mugen hit boxes. Because 1 company isnt creating the characters, I feel the boxes should be as character specific as possible.

    Just because a character is the same basic size as another character shouldnt mean they get attacked the exact same way. Each character is different because they're different. Dhalsim gets to have long fast legs because he walks slow as heck. Zangief gets to take off massive damage with his throws because it's difficult to get in close.

    Having consistent hitboxes for each identical frame is up to the creator. Up until recently I'd do all of my hitboxes by hand. Now I use find/replace to make sure they're exactly the same. But, like Dhaslim's SFK, I use different boxes on purpose. If you really want to get a look at how I want my hitboxes, my Mia718 is probably the best. Most, if not all, of her basics have the trailing off effect. Where the attack focus fades toward the end of the limb. I even have some where the same frame is used without the attack boxes to make counters a little easier.

    No one's given an example where Ryu in statedef 0 with his standing hitboxes having the opening between the legs would cause a problem. Because there isnt. But being able to punch the air between his arm and calf is very much needed?
    vVv Ryuko718 Updated 10/31/22 vVv
    Re: Tutorial Part 2 - Collision boxes
    #18  November 17, 2015, 09:25:58 pm
    • ******
      • www.justnopoint.com/
    I still don't think you understand the full concept of how hit boxes are supposed to function. They don't just adhere to the sprite itself. Heck some hit boxes place CLSN1 under or above the limb of a sprite.

    You're applying real world physics to each frame and that's not the method in which it should be taught. If you personally feel like making your hit boxes like this no one can stop you. But it's important to note why it's perceived as wrong by functionality and community standard. And not just MUGEN community standards. This is Fighting Game Community standards and a FGC would find these CLSN very amateurish.

    The Blanka in your example isn't horrible. It's just a bigger hit area. Dhalsim's kick on the other hand is very over powered there. It can hit near and far, it can hit low and high. It can barely be punished at all because the CLSN2 are hidden so well within all that CLSN1

    There is no "right" and "wrong" per say for the size of boxes. Heck, there isn't even a real rule against using several boxes like you're doing. But there is an agreed upon rule of thumb to how these things are done in all major fighting games. And as such that should be our base for teaching. The base is always the standard and then you deviate from that if you choose.

    We can go back and forth why you think this CLSN should be that and vice versa instead of the norm. But in the end the norm should be what's taught. Because it's what evolved the best fighters to be the best. And it requires a lot less work than adding so many CLSN boxes.
    Re: Tutorial Part 2 - Collision boxes
    #19  November 17, 2015, 11:41:05 pm
    • *****
    • Shame on you!
      • USA
    The amount of hitboxes in Dhalsim, and Blanka, and Ryu, and Mai COMBINED dont match up to what's inside Samus. The amount of frames each with 6 or 7 or more blue hitboxes makes the amount of work in 1 character trivial. Roberto is getting the same treatment Samus got. 2 standing attacks from Roberto is the same amount of frames of ALL of MY Ryu's basics. To date, I dont think there's a Ryu with more basic attacks.
    Old school characters arent that much work.

    Punishing an attack free and clear should only happen from a special. If Ryu throws a fireball, he wont get hit. If Ryu tries to tag the leg by punching or kicking, what would happen if two people kick each other's leg? The both get hurt. If you can time the attack when Dhalsim's retracting his leg, yeah it's free and clear. Just like in practice that's a lot harder said than done.

    Blanka's hit area should be bigger because he's a bigger character.

    I'm using images I've uploaded when I had a discussion about hitspark placement and how I wanted to make a better system... but this should hopefully work as an example.

    I've had a similar conversation in my Ermac thread. and Jesuszilla posted


    Evil Ken's punch lands completely clean because his blue box doesnt extend into the hand, breaking tip #3. I know it's silly to equate to real life, but the kick would win every time.  (why the hitspark is on the chest I'll never know)
    Obviously the Guile example is pretty old, but let's go with it. The only reason I can imagine for the attack box to be higher is to counter air attacks. Someone standing's getting hit, someone crouching's getting hit. There isnt a character in the game who's shorter. EVEN if they were shorter, that's even MORE reason to lower the red bar. Maybe Dhalsim's slide in, but if Capcom made his boxes tighter the two wouldnt connect.
    In my opinion the red bar should match the arm, along with a blue bar, so that you as the player have to time the attack better. And if it is to counter air attacks? Oh well. Learn your character half a second longer til button press or Crouching LP wont counter Air kicks... move on.
    Someone please tell me what the heck the reason is for Guile's CLP boxes. Honestly, if you can explain to me why they're like that I might actually see the reasoning. Right now, I could like probably 4 or 5 more reasons it should be like I suggest.
    Basically, it's a way of cheating instead of making the character who it IS.
    Guile also breaks tip #3

    BTW, This is supposed to be the guide. Up until now I've never seen a full discussion or set of rules for how high your crouching light punch box should be off the ground. I've only seen guides on how to rip source or heard people complain it's not source. There's no Mugen hitbox discussion that I've seen til this thread. 
    I doubt it's even possible to try and combine or put together basic thoughts on clsn boxes that arent centered around 1 game.  Even if you could, that game wouldnt be Mugen.
    No one will answer why you should be able to punch air.
    vVv Ryuko718 Updated 10/31/22 vVv
    Re: Tutorial Part 2 - Collision boxes
    #20  November 18, 2015, 02:47:32 am
    • ******
    • Loyal to the Game
      • USA
      • http://jesuszilla.trinitymugen.net/
    Holy shit your posts are giving me a headache. I can't even be bothered to read them in their entirety with your flawed logic. You don't have to, and shouldn't, make everything literal. I learned that a long time ago.

    Everything is designed a certain way for a clearly defined functional reason. Priority in traditional fighters is determined by hitbox size and placement. Doing it the way you have it pretty much leaves everything up to the character with the fastest speed and lowest height because you're not thinking about the design other than "it must completely cover the region!"


    Take this for instance. I designed it so that the attack box would go with the motion while still leaving him completely vulnerable low so that it will beat out most crouching punches but still leave him open to most crouching kicks.


    Now here's my favorite. The hitboxes are not placed right where his legs are. Do you want to know why? Because he wouldn't be able to fucking hit most opponents if I didn't do this! He would be too high off the ground to even hit Ryu unless I put him at an unreasonably low height that would cause him to land faster and not look as good in motion.
    Re: Tutorial Part 2 - Collision boxes
    #21  November 18, 2015, 02:58:34 am
    • ******
    • [E]
      • Mexico

    tip3 is deprecated, is just some shit elecbyte made up when they amde up teh magical prioroity number because they had no idea how fighting games worked.

    I know it's silly to equate to real life, but the kick would win every time.
    not really, in real life both would get hit, the one who was moreprepared for impact woudl relatively win, so if the abse of the palm of the hand hits an untrained shin, it would win, maybe even break the shin.

    Obviously the Guile example is pretty old, but let's go with it. The only reason I can imagine for the attack box to be higher is to counter air attacks. Someone standing's getting hit, someone crouching's getting hit. There isnt a character in the game who's shorter. EVEN if they were shorter, that's even MORE reason to lower the red bar. Maybe Dhalsim's slide in, but if Capcom made his boxes tighter the two wouldnt connect.

    it's there so crouching kicks can go belos it; fighting games are a complex game of rock-paper-scissors.

    BTW, This is supposed to be the guide. Up until now I've never seen a full discussion or set of rules for how high your crouching light punch box should be off the ground. I've only seen guides on how to rip source or heard people complain it's not source. There's no Mugen hitbox discussion that I've seen til this thread.
    I doubt it's even possible to try and combine or put together basic thoughts on clsn boxes that arent centered around 1 game.  Even if you could, that game wouldnt be Mugen.
    No one will answer why you should be able to punch air.

    you have not been there long enough or have not payed enoguh attention, those discussions do happen, though not  very often, maybe once a year or so.
    you are thinking tht fighting games companies are monolitch, btu that's far from the truth, people taht created sf2, left adn joined snk to create samsho, people that worked on world heroes left and worked on guilty gear; people who worked on kof went and worked on dark angels; non doujin fighting games share a lot of common traits, clsns balance is one of those.

    Re: Tutorial Part 2 - Collision boxes
    #22  November 18, 2015, 05:44:17 am
    • ******
    • Legendary XIII
    • I am the eye of the storm to come!
      • New Zealand
      • network.mugenguild.com/cyanide/
    Hit boxes are designed to show motion over time. Not only that they are there to allow for the character to ADJUST his own attack without the sprites to do it. If someone is a little low for your standard kick in real life, do you go through with it anyway, or adjust so as to hit them. This is why the boxes detail certain aspects of the sprite and don't adhere to pixels.

    Random gaps and ignoring the movement through the attack that we can't actually see is bad hitbox design.

    Hit boxes cater for the things the sprites don't, or can't show. If you ignore those you get something that misses when it really shouldn't, or punishes things that ought to trade hits.


    In M.U.G.E.N there is no magic button

    They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
    Re: Tutorial Part 2 - Collision boxes
    #23  November 19, 2015, 11:08:40 am
    • *****
    • Shame on you!
      • USA

    Now here's my favorite. The hitboxes are not placed right where his legs are. Do you want to know why? Because he wouldn't be able to fucking hit most opponents if I didn't do this! He would be too high off the ground to even hit Ryu unless I put him at an unreasonably low height that would cause him to land faster and not look as good in motion.
    What you're saying is, instead of worrying about when, and where, and who, your attack can/could hit, you'll fudge it and sorta-kinda cheat a bit. I dont believe in that. Make a different move. Or use another move. And yes, I know he's custom. Why dont you add the ability for Dhalsim to CMP your leg? You can edit the code so he doesnt land as fast. I have this sort of code for when you're falling doing a fireball/missile. It's very noticable in Samus. She'll quickly slow to a stop if she gets too close to the ground when shooting her missiles. (Not that she's the best)
    I'm not saying this to get your goat or anything, but I can help you if you think it'd be a good option for him.

    Obviously the Guile example is pretty old, but let's go with it. The only reason I can imagine for the attack box to be higher is to counter air attacks. Someone standing's getting hit, someone crouching's getting hit. There isnt a character in the game who's shorter. EVEN if they were shorter, that's even MORE reason to lower the red bar. Maybe Dhalsim's slide in, but if Capcom made his boxes tighter the two wouldnt connect.

    it's there so crouching kicks can go below it; fighting games are a complex game of rock-paper-scissors.
    IF the crouching kick and the crouching punch happen to connect, they SHOULD connect. But, I'm imagining tight hitboxes on P2's kick. It's the fact that the "Normal" hit box will be fat and clunky; Then that edit to Guile is needed. If both hitboxes were tight, there'd be no problem and it'd actually be far more accurate.

    Hit boxes are designed to show motion over time. Not only that they are there to allow for the character to ADJUST his own attack without the sprites to do it. If someone is a little low for your standard kick in real life, do you go through with it anyway, or adjust so as to hit them. This is why the boxes detail certain aspects of the sprite and don't adhere to pixels.

    Random gaps and ignoring the movement through the attack that we can't actually see is bad hitbox design.

    Hit boxes cater for the things the sprites don't, or can't show. If you ignore those you get something that misses when it really shouldn't, or punishes things that ought to trade hits.
    I pick, or should say I'm forced, to use a certain set of attacks when fighting Roll, Servbot, and Onsokumaru. As you can see with my Dhalsim's kick, I do have a bit of leeway on the attack box. I totally agree with You Cyanide. A little bit of wiggle room is needed. But will I make Ryu's overhead punch go down to the floor so it can hit tiny characters? No, cuz it's sorta cheating. Do I think you think that? Nope.
    I also agree with ignoring the attack's movement is pretty bad. I didnt edit ALL of Mai, but if you look at 210/215/245 you can see how my movement is shown, and how I use the same frame duplicated and drop the attack for counters.
    I _think_ this is one of the basics I frankensprited for her. This is her 420/CFP so I'm pretty sure it's the one I added.

    You can see I use an astounding TEN clsn boxes in the second sprite. If a character/my opponent is good enough to time a trade on her hand, awesome. I think they should be able to do that. If P2 is trying to drop an air knee attack, the swipe of the fan should connect. And because she's attacking and stops, the fan should still be unable to be punched. When she's bringing back her arm she's wide open, but punching the fan shouldnt hurt her.
    You can say I COULD do it with less. I can sort of agree, but WHY? Why make it sloppier? Sure you could combine the head, arm, and hand boxes in the last frame,
    but again,
    Why should you be able to punch air? Why should you be able to punch in between her hand and her head? Motion???
    vVv Ryuko718 Updated 10/31/22 vVv
    Re: Tutorial Part 2 - Collision boxes
    #24  November 19, 2015, 11:40:03 am
    • ***
    • MAX 330 MEGA PRO-GEAR SPEC
      • UK
    Oh fuck are we going to bring the "you punched my sword" argument into here as well.
    Re: Tutorial Part 2 - Collision boxes
    #25  November 19, 2015, 12:44:52 pm
    • *****
    • Shame on you!
      • USA
    I'm not actually interested in that, we're talking about hitboxes.
    Spoiler, click to toggle visibilty
    vVv Ryuko718 Updated 10/31/22 vVv
    Re: Tutorial Part 2 - Collision boxes
    #26  November 19, 2015, 06:09:08 pm
    • ******
    • [E]
      • Mexico
    now we are just going in circles, if you refuse to listen that's ok, if anything this serves to new users can read the most common misconceptions (thanks to you) and know why things in real games are not like that.
    Re: Tutorial Part 2 - Collision boxes
    #27  November 19, 2015, 07:34:22 pm
    • ***
    • MAX 330 MEGA PRO-GEAR SPEC
      • UK
    Something I just remembered, KOF XIII has excellent examples of boxes not lining up 1:1 with the sprites as (aside from SNK sticking to the same 2/3 box layout in their previous games) Kyo and NESTS Kyo have a lot of wildly variying boxes even on normals with the same animations.

    Spoiler, click to toggle visibilty

    Despite the sprite, that is Blaziken's jumping LK, in which I'm following MvC box conventions so it has an unusually large blue box that covers the entire foot - similarily Kamekaze's MvC3 Ken has large red boxes to match the source games, and I probably frame advanced that to just the right frame where they're touching each other by pixels to get a nice shot. Please don't cherrypick from WIP stills like that.
    Last Edit: November 19, 2015, 07:56:28 pm by The 100 Mega Shock!
    Re: Tutorial Part 2 - Collision boxes
    #28  November 19, 2015, 10:03:12 pm
    • ****
    • "OHHH YES!"
      • Canada
    I don't see how making a hitbox not line up with a move in lieu of its designed purpose is fudging it. Animation is there to animate, hitboxes are there to hit things. They work in tandem but not always 1:1 with each other. To go back to square one with your Sim example, his blue box is like that so that jump ins can actually hit it in MOST instances, because hitboxes are and always will be designed (in fighting games at least) with UNIVERSALITY in mind because that's what makes a strong, stable game that doesn't work in janky ways. Hitboxes have wide punish windows on moves like that to promote FLEXIBILITY and CONSISTENCY, two things you want your game to have at a top level, Alpha 3 was designed for this, hence its boxes follow this kind of rule, especially on a normal that goes fullscreen. This also has the additional benefit of having your hitboxes EASIER TO UNDERSTAND and lab out punishes for if they're cohesive, simple, and for the most part allow flexible punishing and trades. This creates and enhances the dynamic.

    tl;dr the blue boxes are giant so an assortment of moves can actually properly hit them, which is VERY important in Sim's case.

    You can debate how good of an idea it is or not but the point stands that Capcom has been doing this for longer than all of us and they have created the most successful competitive fighting game series based on this very groundwork. I'd be all for change if it wasn't change that wasn't necessary.

    Also the reason Blanka's face and lower legs can't get hit is because the fundamental point of jumping in a fighting game is to avoid being hit and attempting to gain positional advantage or to transition from neutral to advantage, which you can not do if your jump boxes leave you TOO open. Otherwise jumping is too much of a risk to be worth it against anyone with anti airs.

    I don't plan on contributing any more points since my stance won't change, I'm simply attempting to explain the reasoning behind these hitboxes. They also did it like this to be efficient as well as productive for the players so it's ultimately incredibly smart design, since drawing rectangular hitboxes actually DOES take some doing for arcade boards and too much of them can cause problems IIRC.

    But are there truly grown men in this world?!
    Last Edit: November 19, 2015, 10:10:19 pm by Killer Kong
    Re: Tutorial Part 2 - Collision boxes
    #29  November 19, 2015, 10:17:51 pm
    • ***
    • MAX 330 MEGA PRO-GEAR SPEC
      • UK
    SFIV also works like a CPS game to some extent, they generally have between 2 and 4 big hand-placed boxes on the stance/movement anims (this includes jumping boxes like the old games, also everyone has a HUGE crouching hurtbox) and during the active frames of many moves, before switching to many boxes automatically aligned to the character's skeleton during recovery frames. Bet SFV works much the same way.
    Last Edit: November 19, 2015, 10:24:33 pm by The 100 Mega Shock!
    Re: Tutorial Part 2 - Collision boxes
    #30  November 19, 2015, 11:51:55 pm
    • ******
    • Hedgehog Whisperer
    • Red Bull addict
      • Spain
      • xgargoyle.mgbr.net
    oh yeah, definitely Mai needs a specific clsn for her boobs
    XGargoyle: Battle posing since 1979
    http://xgargoyle.mgbr.net
    http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
    http://paypal.me/XGargoyle  <-- Donations welcome!
    Re: Tutorial Part 2 - Collision boxes
    #31  November 20, 2015, 03:25:31 am
    • *****
    • Shame on you!
      • USA
    They work in tandem but not always 1:1 with each other. To go back to square one with your Sim example, his blue box is like that so that jump ins can actually hit it in MOST instances, because hitboxes are and always will be designed (in fighting games at least) with UNIVERSALITY in mind because that's what makes a strong, stable game that doesn't work in janky ways.
    This also has the additional benefit of having your hitboxes EASIER TO UNDERSTAND and lab out punishes for if they're cohesive, simple, and for the most part allow flexible punishing and trades. This creates and enhances the dynamic.

    Also the reason Blanka's face and lower legs can't get hit is because the fundamental point of jumping in a fighting game is to avoid being hit and attempting to gain positional advantage or to transition from neutral to advantage, which you can not do if your jump boxes leave you TOO open. Otherwise jumping is too much of a risk to be worth it against anyone with anti airs.

    I don't plan on contributing any more points since my stance won't change, I'm simply attempting to explain the reasoning behind these hitboxes. They also did it like this to be efficient as well as productive for the players so it's ultimately incredibly smart design, since drawing rectangular hitboxes actually DOES take some doing for arcade boards and too much of them can cause problems IIRC.
    Thank you for your answers. They're actually REAL answers.
    The reason I like tight tight tight hitboxes is so there's no guess work. If you see an arm or whatever, where ever it's at, you should be able to hit it if you have the skill. What's easier to understand, the ability to punch air randomly, or being able to attack what you see? Punching air is far more janky in my honest opinion. I disagree that it enhances the fighters/fighting dynamic.

    I dont believe in not being able to block while jumping. I've edited most of the characters in my roster so most of their moves can be blocked in the air. SFEX characters is a prime example. MvC characters should be able to block in the air even against the SFEX characters. Yes, other edits are needed to boost their attack prowess.
    umping in safely comes down to learning your character and opponent. The character's overall size is both a benefit and a drawback. So it neutralizes itself out. Making a hitbox smaller so the character could get around a projectile it shouldnt is unfair in my opinion. Projectile heights from all the different characters out there wont be uniform. Guessing what size the box(es) should be is just that, guess work.

    Please consider replying.
    Also, thinking about the actual arcade board it makes sense on the old hardware. I dont think 1.0 mugen would/could have those limitations. As I and others have suggested, 10 hitboxes isnt a lot.

    oh yeah, definitely Mai needs a specific clsn for her boobs
    Yeah I was considering doing that but then I decided shoulder to shoulder would be best.
    vVv Ryuko718 Updated 10/31/22 vVv
    Re: Tutorial Part 2 - Collision boxes
    #32  November 20, 2015, 03:38:11 am
    • ******
      • www.justnopoint.com/
    Quote
    The reason I like tight tight tight hitboxes is...
    It was never a question of preference though. I already said you can like whatever you wish. Just that when teaching the standard should be taught. Not your personal modified preference. All this time it seemed more like you were trying to redefine how CLSNs should work in MUGEN.

    now we are just going in circles, if you refuse to listen that's ok, if anything this serves to new users can read the most common misconceptions (thanks to you) and know why things in real games are not like that.
    All this will help me better explain in the new tutorial I'll be making too :)
    Re: Tutorial Part 2 - Collision boxes
    #33  November 20, 2015, 07:37:04 am
    • ****
    • "OHHH YES!"
      • Canada
    Alright, I'll address what you had to say. On the subject of Point A

    - I think the way you design hitboxes ends up as far more guesswork for the player than a general blue area you can hit (regardless of if it's hitting the air or not). A general rule of thumb when designing hitboxes for moves should ALWAYS be that people don't have to actually look at the hitboxes to understand where and how to punish the move, and this is ESPECIALLY important outside of MUGEN (it's important inside too because intuitive design). Why is that big blue gap intuitive? You can punish it with a wide variety of things, people don't have to literally AIM for his leg, they can aim for the general area and that creates LENIENCY and FAIR GAME DESIGN because it improves the reliability of your reactions and interactions. Literal hitboxes have traditionally sucked hot ass in Capcom games (pardon my language, they just have). Gief's anti air Super in Alpha 2 uses literal grab boxes (it's only on his hand) which results in it losing to damn near everything and only catching people at the APEX of their jumps. It's worse than Rose's METERLESS anti air grab and it's a good reinforcement of my point. Hitboxes being literal is quite arbitrary and also inhibiting for either the player attempting to punish the move or in some cases the player actually USING the move. If you want a direct example of the fundamental reason you should always design hitboxes applicable to move function over attaching them SOLELY to the animation, Shoryuken would be terrible in SF2 and onwards if they did this.
    Spoiler, click to toggle visibilty
    Imagine if the red box was bound solely to his arm. It would suck at discouraging jumps, punishing careless attempts at jumping, and general footsies. It would be horrible for reversals if his body had blue boxes because the point of the move is to be a REVERSAL and go THROUGH fireballs because that's how neutral and flow in Super Turbo work, I can't think of a better example where literal hitboxes are NOT a good idea, it would practically ruin all the fundamentals ST taught the FGC about fighting games. Move function and design intent should ALWAYS be prioritized when it comes to hitboxes because otherwise your moves may lack cohesion, structure, or they may even lack a use (like Gief's anti air super, it's seriously garbage).
    - My comment on jump boxes had nothing to do with air blocking. Air blocking isn't an issue for me at all, but when your jump box is too damn big everything will hit you anyways, even if you air block you are sacrificing position because of pushback. It inhibits safe jumping, a fundamental aspect of fighting games ever since SF2, it inhibits jumping away as a strategy, it just makes jumping worse period. Jump boxes are designed like jump boxes to make jumping not a terrible option.

    This is legitimately my last post and final rebuttal. I've provided pretty clear examples for both and it should probably be more than enough evidence for anyone else hopping in here to decide for themselves.

    But are there truly grown men in this world?!
    Last Edit: November 20, 2015, 07:44:13 am by Killer Kong
    Re: Tutorial Part 2 - Collision boxes
    #34  November 20, 2015, 11:19:37 am
    • ******
      • www.justnopoint.com/
    I'm on my phone so I can't post an image but 1 last good example would be Ryu's jumping MK. It's the exact same animation as his jSK but it acts as a cross up. The red extends from the kicking foot all the way back to the non kicking foot. Looked at literally it's like the back of the kick hits you when he jumps over you. It's a very specific functuality that separates the exact same frames and makes the attacks have totally unique uses.
    Re: Tutorial Part 2 - Collision boxes
    #35  November 20, 2015, 01:00:54 pm
    • ******
    • Double-Crosser
    • I'm not standing out. This isn't weird at all.
      • USA
    I like doing KOF-style hitboxes. For the most part, they're simple (like maybe three hittable boxes max) and they get the job done. I didn't have any hitbox viewer when I made Pupa, so I looked at how KOF did some attacks and I borrowed some of that philosophy. To be fair, it's probably the easiest style to mimic, the easiest to actually access (Winkawaks with developer debug dipswitches), and more often than not will accomplish what you want it to accomplish.

    Now to sit back and enjoy the nerd rage.
    Re: Tutorial Part 2 - Collision boxes
    #36  November 20, 2015, 07:13:41 pm
    • ******
    • [E]
      • Mexico

    there are a few valid reasons to use more boxes, but they are not valid in mugen; some game engines will allow you to detect which box exactly was hit, so you can do low/high animations or do different damages depending on the box that was hit, it's probably the reason why in some games capcom uses more boxes event though in practice some of those are just one box split in two.