Dance! Dance! Robolution

by 

Paula Ledgerwood


Hello! My final project was a program that simulated Dance! Dance! Revolution with a robot (from Assignment 2) that dances as you play. Below is a screenshot of the robot in a dancing pose.




The technical tasks in this project consisted of the following:

1. Animating the robot in a fluid, more realistic motion

To animate the Mr. Robot character to move his legs in a somewhat realistic DDR fashion, I had to do a lot of testing numbers and movements. I modified Assignment 2 to write to an output file the name of the selected component and its angles as I changed them to obtain max and min angle values of the joints. To create the effect of lifting up the knee, I moved the joint angle of the calf by the negative amount that the mesh of the thigh was being moved.

2. Moving arrows toward static arrows

Each arrow is an object; I randomly colored each arrow direction, but keep track of the color in a material to color the static arrows slightly darker than the moving arrows. The static arrows increase in size when you press the correlating arrow key. The moving arrows are an array of 4 arrows that start at different times and have different speeds.  When you press the arrow key, I check the vertical distance between the arrows and output a message based on its accuracy. Once the arrow reaches a certain height, it respans below the dance floor again. If it hits this max height without an attempt, it outputs the NOPE message.

3. Creating a colorful dance floor

The color dance floor is created by a double for loops that checks if the sum of the row and the column index are odd. If it's odd, I give it a random color, and if its even, I color it black. The entire set up is actually within a black colored cube room.




4. Displaying text on screen

The text on the screen is a JPG image texture of the word. It is drawn on the screen and then shrinks quickly. There are four responses: NOPE, AVERAGE, GREAT, and PERFECT! depending on how close you are for any given arrow. For each reaction, a different amount of points are given or taken away from the total score, which is initialized at 0. The total score is not printed on the screen, but is output in standard out after you click on the window to end the game.





Online resources:
- arrow STL file
- STL to OBJ file converter
- how to play WAV files
- Never Gonna Give You Up by Rick Astley
- Youtube video to WAV file converter
- how to open and close stream files
- how to add timed delay