Thursday, May 3, 2012

tactic logics

I've been doing no training, had a long spell with no one to fight with, haven't even done much thinking about tactics. Which is all bad for me. However, I have been learning some game programming, which is nice because I've been able to use some of the mathematics and physics from my supernerd background. I used a transformation matrix to solve an actual problem! woo!

and but then, I learned some things that sort of apply. so here we go.

I've played a lot of computer games, and I like them, but almost all games handle melee combat in a way that doesn't reflect any of complications and tactics I know. At best, you can hit, block, grab, and move, and those options tend to function in a rock-paper-scissors kind of way. Hit slow or fast, strong or weak, etc etc. It can represent tactics on a sort of metaphor level, but it never really feels right to my sensibilities.

Part of this is due to the definite nature of computers. but it's also do the modelling of controls, which can get very complicated. at the basic level, you have this

READY
HIT

as in, you're standing there, or you're hitting. Something, or nothing. So the first improvement I learned about is a finite state engine.

READY [transition> HIT

You're still just ready or hitting, but there's a instant phase of logic and calculations that determine if you can hit, how you hit, if other things happen. Better! but still not right. I want at least a preparation phase.

READY -transition-> PREPARATION -transition-> HIT

so that's a bit better- allows for the possibility of counterattacks and reaction time, but... it still doesn't feel right. I could add more states, but that would just turn into complication, and it'd feel like I was making places where there weren't really places, if that makes sense. and from a game programming standpoint, it becomes totally unmanageable.

enter fuzzy logic. I discounted fuzzy logic for a long time, because logic is binary, and you can never get it to be actually fuzzy. and... I still think that. "fuzzy logic" is a lousy name for a useful way of thinking. so before, if we were looking our fighter, it would be like
FIGHTER STATE: ready or FIGHTER STATE: preparation. The fighter could only be one thing at a time in terms of the responses and possibilities, 0 or 1. What fuzzy logic is about is assigning values from zero to one to various conditions and then assessing the state in response.
so now:



the blue indicates READY, the red PREPARATION. so there's a ready state, but then there's a mixed zone that you can assess. you're .8 ready, and .2 preparing. This starts to make sense to me- interpreted as mentally preparing an attack, but not having compromised any physical readiness. The opponent can maybe see it as a change of expression, or a slight change in tension, or any of the other tiny clues. Then it moves on into pure preparation- definitely reconfiguring to attack, but not there yet. And then gradations of attack- the overlap would be where the attack has started and is going to happen, but there is still an opportunity to change targets, or attempt to prepare to stop the attack short, or to make it longer. And then another gradation after that, where the attack has mostly finished, and recovery is starting. etc etc.

and the values never have to go away entirely. for example:
attacking= .8
retreating=.2

if you assess their state, you can say "yep, they're definitely attacking. but they're also shying away and trying to avoid getting hit." which is definitely something you see a lot of.and it doesn't have to be limited to two values, there can be many, and you can set whatever cutoff levels you'd like to determine what is going on, and still assess to one current state, but have references and degrees of many others.

4 comments:

  1. I agree that most games deal with melee combat poorly, not focusing on the detail or even the tactic choices. As Long time player of the Virtua Fighter I have always found this to be about the best game combat set up. It success is that although there is a preparation and spent f=phase of the attacks and it basically builds on the rock/scissors/paper model it works primarily from the mind and skill set of the players.

    It seems to me that much of what you describe above is basically taken care of buy the OODA loop of the players. As long as there is a little distinction in the moves executed by the on screen characters, you are actually playing against the skill of the other player channelled through the character they choose. One learns to understand the style, strengths and weaknesses of the various characters and one find the one that suits you the best.
    Of course there are the newbies who just hammer buttons with no plan and can be hard to be as they act irrationality, however a more skilled player will work the rhythm and then work inside it or, and /or employ the techniques that will generally neutralise the random element.
    Check out sirlin.net he has some good articles on game design

    ReplyDelete
    Replies
    1. I would say the main difference is that in fighting games, there is no visible difference between a feint (start attack - cancel - do something else) and a real attack. While that is definitely something to aim for in a real fight, it's never fully achievable, and the way the differences increase as it approaches the last-possible-moment to react, from an OODA loop perspective, is where a lot of the real heart of a dueling-style swordfight takes place.
      I've read sirlin.net - it's really good stuff, the "i know that he knows that I know" aspects definitely spoke to my fencing experience, but that's the metaphorically applicable level I was talking about.
      I think of it this way- they refer to fencing as "physical chess", and there are some similarities, but it's a game of chess where a pawn can get tired and only move 3/4s into a square, or a knight can miss, or, on a higher level, you can make the knight jump around a few times to ensure that he's tired and more likely to miss. In other words, the difference and heart of it all are in the forced and unforced errors that are a result of being fallible, complicated, biological creatures.

      Also, about rhythm: creating, matching, and maintaining rhythm are all useful dueling skills. with video games, though, that's where it ends- you get the rhythm, you keep it going, your combo keeps going. in the physical world, you establish the rhythm, but the best actions happen when you break it.

      Delete
  2. I'd disagree. You can break rhythm in good fighting games. You get in side their timing. But only in good games. The Virtua fighter series and some of the soul caliber games.
    Also surely in real life there should be no visible difference between a fient and a real attack either?!
    I tend to avoid fients. Rather start an attackbut if it draws a response change target. If it doesn't then hit the original target.
    Certainly in VF games you can do something similar in certain moves. Canceling and switching to another.

    ReplyDelete