This page is about a language for fighting games. I am not in a rush to make this game, so a website was in order to explore this idea further. I think I can work more with the ideas if I put it on a website.
[Posted 30 September, 2004]
Some psuedo-BNF(backus-naur form) description of where my language is at..
assignment ::= identifier(ws)=(ws)text(nl) toggle ::= toggle(ws)identifier(ws)=(ws)(toggleitem(ws),(ws))*toggleitem toggleitem ::= (LPAREN)integer(RPAREN) | integer actiontitle ::= identifier(LBRACKET)(actionpair,)*(actionpair)*(RBRACKET) actionpair ::= (ACTIONPROPERTY)(COLON)nonbreakingtext action ::= actiontitle(ws)block block ::= (LBRACE)(statement)*(RBRACE) statement ::= block | milestone ::= integer(COLON) | end(COLON) | all(COLON)An example of this being applied:
Smash[length:22, energy:160, command:punchkey]
{
0:
2:
20:
frame = doku6
4:
frame = doku7
attack
{
damage = 15
hittype = 3
blockable = 0
combotype = 2
sound = hit1
misssound = 0
}
}
[Original post]
In addition actions consist of phases. For the programmers present, an action is much like a select-case statement from basic, or a switch statement from c.
So its got this basic form:
action action_name phase_num: phase_num: attribute=value attribute=value phase_num: phase_num: attribute=value attribute=valueaction_name is just a simple identifier.
Multiple phases can share the same attribute-value pairs to save space.
Furthermore, one optional phase is "all:" which takes effect every single phase.
Another possibility is a "default:" phase which takes effect when the current phase
hasn't been identified elsewhere.
For instance, in a generic walking action; How can it know what frames to change to as the action
progresses. So somehow the game character code needs to pass this information on.
The purpose of writing this up is to make the most of this idea.
The solution doesn't need to compromise.
action-start name=bash defaultmovex=14 phases=3 phase=0 frame=doku1.bmp dir=toggle phase=6 dir=toggle phase=16 attack=1 damage=10 hittype=3 hitsound=hit1.wav blockable=0 combotype=2 missound=0 phase=17Applying the new suggested syntax the above may look like:
action bash finish=17 all: movex=14 0: frame=doku1.bmp dir=toggle 6: dir=toggle 16: attack=1 damage=10 hittype=3 hitsound=hit1.wav blockable=0 combotype=2 misssound=0So to walkthrough this code...
In summary, the character takes a few steps back, then heads charging at the opponent, with a
chance of causing damage near the end of his charge.