Feb 19, 2022

Karate Champ (NES): Good Intentions, Faulty Logic

I loved the C64 port growing up, but I couldn't stand the NES port for even 2 minutes. Excluding the poor sound design as just a product of its time, there was no getting around the lack of bonus stages, buggy controls, and awkward hit detection. I decided to take a peek at the code to see if I could figure out what the heck is going on.


The manual says you need to hold a button down long enough for it to register, otherwise it's a half-executed move. This is bunk. There is no such thing as a half-executed move, you either execute it or you don't. A "hold" is for 1/8 of a second or less -- a tap in some people's minds. The game only updates the controller input once every 8 steps. That's why you need to hold the button down. It's this mechanic which is partially to blame for the buggy controls. In a properly coded game, you would be given time to press both buttons in any order within a short span of time before the game decides how to react. It's an acceptable form of input lag. In Karate Champ, I think they were trying to do that, but you now have a window of 7 specific frames to input your move command, then on the 8th specific frame it acts. Let's say you wanted to do a jump kick (UP+A). You have less than 8 frames to press AND HOLD both buttons. If you hold UP on frame 6, you then have 2 frames within which to hold A, otherwise you will just do a jump. If you hold A on frame 7, you must then hold UP on the next frame, otherwise you'll do a normal punch. There is no way for you to know which frame the program is on, thus frustration often ensues.


Before I get into the game's hit detection, I need to address some possible errors I've encountered around the web in regards to scoring. Firstly, the US manual is crap and tells you nothing about how points are scored, which I'm sure was frustrating for some. The rules summary on StrategyWiki is less vague.

"If an attack scores 500 or below, the winner earns a half point. If an attack scores 600 or above, the winner earns a full point.The score of an attack is determined by how well the attack is executed, and how cleanly the opponent is hit."

The guide at GameFAQs for the arcade version lists the possible score points and match points for each attack. Unfortunately, both the StrategyWiki entry and GameFAQs guide are WRONG, at least pertaining to the NES port. Every attack in the game can score either a half point or a full point. Even the standard reverse punch can count as a full point if it's a "clean hit" (see below).


First off, if we were to think of Karate Champ's hit detection in terms of hit boxes, every attack has an 8x256 "hit box". In other words, there is no vertical component to hit detection. The game merely compares the x-coordinates of both fighters against a distance requirement. This requirement is dependent upon the direction each fighter is facing and the current state of the opponent.


A fighter can be in one of 53 states during a fight, thus for any attack, there are 212 possible distance requirements. If an attack cannot technically hit the opponent, it will have a requirement of -1. A foot sweep cannot hit an opponent in the air, for example, so the distance requirement for a foot sweep against a jumping opponent is -1. Similarly, if the opponent is behind the fighter, a front kick will have a distance requirement of -1. If the requirement is not -1, the game subtracts 4 from this requirement to get the minimum distance required, and adds 8 to that value to get the maximum distance required, then compares the distance between fighters.


If the distance between fighters is the exact same as the requirement, the attack is registered as a "clean hit". A unique sound is played and a full match point is given to the attacker. On the other hand, if the attack is not equal to the requirement, but is within the minimum and maximum requirements, the attack is registered as a normal hit, an arpeggio plays, and only a half point is given to the attacker.


On paper, the attack mechanics look fine. In practice, an attack can appear to hit the opponent, but still count as a miss because it was too close, which is really what people are complaining about when they say the hit detection sucks. Personally, as frustrating and as much of a turn-off as it turned out, I think this was a logical programming choice. If you stand too close to someone, you're typically not going to be able to punch or kick them with full force. Unfortunately, that just doesn't translate very well in a video game.

 

No comments:

Post a Comment

©TheouAegis Productions™. Powered by Blogger.