Skip to content →

Dance Game : Project Set up (BitMask Method)

Learning bitmask was fun, at least I had my basics clear after reading articles and watching a video tutorial series on bitmask. In this post I’ll go through process of setting up dance moves using bitmask. Just like in the strings method, I used the data table. The same works for this method too. However, the data table in this method will only have some values instead of the key names.

I used the same “mix and match” excel sheet to make this. I listed down all the moves buttons I wanted to use. Gave each one of them a 2n¬†value and then I did a vlookup of the buttons from the value table

Excel Table

Copied the data of the Moves and Values columns in a new excel sheet, saved as .csv.

Created a struct in unreal engine, with a new integer variable called “Values”. This should be the same as the row names for your values.

Struct for data table “Values”

In the next step I created enums for all the buttons I’ll be using. You’ll notice that in this enum I have 8 entries, duplicate entries for the face buttons. This is because, if the same button is pressed twice in a 3 button move, there won’t be any way for us to identify the difference whether “A” for instance was pressed once or twice. Hence we have these buttons named as 1st val and 2nd val in the end.

Enums for Gamepad Buttons

After creating the enums, I wanted to store the data table values in an array to avoid the mistake I did in the “strings method”. So, I set up my data table to store it’s values on event begin play, like in the image below.

Storing data table values on event begin play


Post that I used the below setup to identify my keypress


Left stick events

TimeCheck_LS 1

TimeCheck_LS 2

Face Button Events 1

Face Button Events 2





Published in Dance Game


Leave a Reply

Your email address will not be published. Required fields are marked *