Re: [Algorithms] finite automata in fighter game
Brought to you by:
vexxed72
|
From: Jeffrey R. <jr...@he...> - 2001-12-20 18:32:04
|
You should think about having a high-level finite state automaton, and in each state use user input to parameterize the state. For example, some good state would be : Idle, blocking, charging-up, performing a special move, hitting, kicking, kneelling, dying. A high level description would be something like 20 different states. >From idle, for example, the "kick" button would bring you into kicking, from which "time" would bring you back to idle. You should keep the serie of button presses outside the state system. This would allow you to process multiple button presses across different states to make special moves. Example: Button A is a simple kick Button B is a punch C serve to block, and D to jump. ABABCDCD is the Big Impressive Kick. As soon as you press A, the kick is started. Then, while the kick is performed, and whatever else happens, the remaining BABCDCD is recorded. If the player is still in a good position to perform the Big Impressive Kick, you then get a single state change from "kicking" to "Performing a special move". Of course, "Performing a special move" would have a parameter telling which special move you want. I think a high-level state diagram, with some variationw in each state ( position, move, etc.. ) gives you the best of both world : simplification at a high level, a small diagram and a much more rich behaviour within each state. But I must I never made a fighter game. One thing I'm certain about, though, is that you want to separate the actual animation frame from the game-state. Your game-state has to be clean, portable. The actual frames will tend to be variables according to the platforms, will need tweaking at the end of the project, might change according to the players stamina, and so on.... Anyone on the list who participated in something like DOA or Soulcalibur would care to elaborate how they do it ? :-) Jeff. ----- Original Message ----- From: "Przemek Tomczyk" <caf...@ze...> To: <gda...@li...> Sent: Thursday, December 20, 2001 11:24 Subject: [Algorithms] finite automata in fighter game > hi! > it's my first post to this list, so greetings for everyone. > > I am going to write a fighter game - something with box, karate, aikido > etc. think the way to implement all 'combos' and in general user input > handling would be to use a finite automaton with input signals like > 'left', 'right', 'kick', 'you've been hit' and 'clock tick' for > each player. but, after discussion, my friend pointed me out that the > required number of states would be _very_ lagre. so the idea of > interpolating between states of automaton (state of automaton would > correspond to key frame of animation). although interpolation would > decrase responsivity/playablity. is there another way? using ex. > graphs seem to be equivalent. > > -- > Przemek Tomczyk mailto:caf...@ze... > `When you've got a shiny new hammer, every problem looks like a nail' > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > |