DEV Community

andac
andac

Posted on

Combo Memo WIP: Part 2 - Data Structure (Combo notation)

After defining the scope of the project, the next step is to design the implementation and data structure.

Data Structure

Image description

mermaid graph

Game

  • GGST, SF6, Tekken

Character

  • Ram, Sol, Ky, May

Combo

  • combos for each character
  • f.S > 214P > 214P > dc > 623P

Move

  • Chaining moves in a combo 214 P, 236236 HS

Input

  • Individual input
  • 2, 214, P, D, RC
  • I define input types directional and action here

Combo Notation

Combo notation is more complicated than I thought
c.S > 2H > 623P, c.S > jc, j.K > j.214S

You first have basic directional input and attack buttons

  • Down, Front, Back, etc... which = to 123456789
  • Attacks, and special mechanics, depending on the games
    • P, K, HS, RC, ...

And then you have moves like dragon punch, quarter circle...

  • 216, 236, ...

referring to dustloop, it also has different onditions

  • far, close
  • Charge
  • Delay
  • Cancel
> = Proceed from the previous move to the following move.
▷/land = Indicate that the player must land at that point in the sequence.
, = Link the previous move into the following move.
->/~ = Cancel the previous special into a follow-up special.
dl./delay = Delay the following move.
whiff/(whiff) = The move must whiff (not hit).
c. = Close
f. = Far
j. = Jumping/Aerial
hj./sj. = High Jump/Super Jump
jc = Jump Cancel
hjc/sjc = High Jump Cancel/Super Jump Cancel
dc/adc = Dash Cancel/Air Dash Cancel
CH = Counter Hit
AA = Anti-Air
IAS = Instant Air Special
[X] = Hold input.
]X[ = Release input.
(move) = Move is optional.
[X] or [Y] = Perform sequence X or Y.
[sequence] xN = Repeat sequence N amount of times.
(N) = Hit N of a move or move must deal N amount of hits.
IAD = Instant Air Dash
BRC = Blue Roman Cancel
RRC = Red Roman Cancel
PRC = Purple Roman Cancel
YRC = Yellow Roman Cancel
YYXRC = Dash Input X Roman Cancel in Y direction i.e: 22PRC
XRC~Q = Cancel the X Roman Cancel into Q i.e: RRC~5K
WS = Wall Stick/Wall Splat
Enter fullscreen mode Exit fullscreen mode

Implementation

Image description

I decided to work on the combo string interpretation first and input class.

c.S > 2H > 623P, c.S > jc, j.K > j.214S

Parse Steps

  • Split the combo by >
  • Separate directional and moves input
    • 216P -> 216 + P
  • Map each Input and render the icon

Difficulties

  • How to handle 216216HS -> 216 + 216 + HS
    • As there are two directional Inputs
  • j.S, c.S, f.S
    • Input has conditions, jump, close, far

TODO:

  • Refine the Combo string translation function, supporting all notations
  • Combo List add/ delete
  • Support Multiple Games/ Character
  • Combo List Save to cookie

Repo

https://github.com/andaccc/combo-memo

I have set the repo to public and host it on aws

Top comments (0)