View Single Post
Old 09-06-2004, 10:03 PM   #44
skew
 
Join Date: May 2002
Posts: 39
I've got a little free time so I'd like to update you guys as to what I'm working on.

I've moved the character definitions to script files, each grouped and loaded selectively by the cgame, game, and ui. Initially I had the fighters hardcoded, along with their moves (attacks and combos), but adding new moves and characters was becoming a pretty ugly exercise in copying and pasting code. The entire process needed to be generalized, which it has been.

The main benefit of the .fighter files is letting me specify the combos for moves without having to recompile or add extra code. The combos assume that the player is facing to the right using the current control scheme, and will automatically adjust depending on what direction you are facing at the time of the input.

While the combo aspect of the moves can be set in the .fighter files, the attack aspect cannot. The only thing you can do currently is associate an attack with a certain move. The reason for this is that there is alot of player processing that is done during an attack that cannot be generalized well in a scripting language syntax without a massive amount of work. It seemed reasonable to set up a veritable palette of attacks from which to choose from when designing the character. I plan on supporting every major and special attack available in the standard animation files (30+ I believe). Currently only 14 have been implemented, but things are still moving along nicely.

In terms of player processing (during an attack), there are 3 main components: one that is executed as soon as the combo for the move is detected, one that is executed per frame as the attack is being executed, and one that is executed just as the attack has culminated. This lets me make sure that I have total control over the player during all phases of an attack, and will not let there be crazy exploits (see Killer Instinct).

Going back to the .fighter files, they have allowed me to incorporate some more basic features found in traditional fighting games, such as accessing a moves list in-game through the ui, and letting me populate the character selection screens and such automatically.

Overall I think it has really helped me make alot of ground lately, but things are still far from complete. The way I'm doing the .fighter files brings up a whole slew of possibilities, such as servers with customized character sets, but before I go any further with expanding these ideas I'm trying to get everything thats in place working.

Here is an example of a .fighter file that I've been using to test with and doesn't reflect upon the final design of any character.

Code:
fighter Stormtrooper {
  fighterinfo {
    description 'Blah blah'
    alignment dark
    model_path stormtrooper
  }
  moves 6 {
    inherits none
    move 'Test' {
      attack LS_A_JUMP_T__B_
      combo {
        comboinfo {
          clearable no
          min_input_time -1
          max_input_time -1
        }
        buttons 2 {
          button BUTTON_HORIZONTAL_ATTACK -1 -1
          button BUTTON_VERTICAL_ATTACK -1 -1
        }
      }
    }
    move 'Saber Jump Attack' {
      attack LS_A_JUMP_T__B_
      combo {
        comboinfo {
          clearable yes
          min_input_time 50
          max_input_time -1
        }
        buttons 4 {
          button BUTTON_RIGHT -1 -1
          button BUTTON_DOWN 10 300
          button BUTTON_RIGHT 10 300
          button BUTTON_VERTICAL_ATTACK -1 -1
        }
      }
    }
    move 'Lunge' {
      attack LS_A_LUNGE
      combo {
        comboinfo {
          clearable yes
          min_input_time 50
          max_input_time -1
        }
        buttons 3 {
          button BUTTON_DOWN -1 -1
          button BUTTON_RIGHT 25 300
          button BUTTON_HORIZONTAL_ATTACK -1 -1
        }
      }
    }
    move 'Forward Kick' {
      attack LS_KICK_F
      combo {
        comboinfo {
          clearable no
          min_input_time -1
          max_input_time -1
        }
        buttons 1 {
          button BUTTON_ALT_ATTACK -1 -1
        }
      }
    }
    move 'Horizontal Slash' {
      attack LS_A_L2R
      combo {
        comboinfo {
          clearable no
          min_input_time -1
          max_input_time -1
        }
        buttons 1 {
          button BUTTON_HORIZONTAL_ATTACK -1 -1
        }
      }
    }
    move 'Vertical Slash' {
      attack LS_A_T2B
      combo {
        comboinfo {
          clearable no
          min_input_time -1
          max_input_time -1
        }
        buttons 1 {
          button BUTTON_VERTICAL_ATTACK -1 -1
        }
      }
    }
  }
}
Note that this isnt a finalized version of the format, because alot of the fields are redundant and need to be pruned / replaced. This format is still very much in flux.

When I have some time next week I'll finish writing up a short summary on what all of the used fields do to give you guys a better idea of whats possible.


--
Adnan Zafar
adnan.f.zafar "at" gmail.com

Last edited by skew; 09-09-2004 at 10:04 PM.
skew is offline   you may: quote & reply,