DanceFloor

Introduction

DanceFloor is a rhythm game where you need to move as many times as you can in a limited space. The more you move, the longer you stay, the better your score. To succeed, it requires some sense of rhythm to move with the beats, some logic to make the correct decision under tough situations, and most of all, luck, as the surrounding towers are generated completely random. Yes. there are situations where you will die for sure.

GamePlay Video

Version 1: minimal essential system. Its pretty fun but the main problem is that the beat pattern is just some preset and randomly generated. There is one background loop that goes on forever but there's not much variation. The beat pattern does vary but without a change in music pattern, the change in beat pattern does not feel really justified. Here I still keep track of beat health(number of times users are allowed to input on wrong timing.)

I asked my friend Fang Yi Lin to make some chords for me so that I can have predetermined chord pattern that matches the music. Using this way, the user will get a much better music experience too. I rebuilt the entire project from scratch to accomodate chords this time. However due to input synchronization with 90BPM's eighth note(0.33 seconds) conflicting with my input accuracy threshold(0.3 seconds), I have to seek alternative. The system is in place and I just need music.

Final demo version: I speeded up the chords Fang Yi made for me to BPM120 and set the system's BPM to 60. Now I have everything working except for the chord pattern. There is really no pattern left once everything is speeded up to 120 when my system is taking it as 60BPM. I aslo spent a lot of effort trying to make it minimalistic under the influence of a lot of games I played recently(like 2 Cars, such a awesome game!). Finally despite the minimalistic theme, I added a bunch of subtle animations in the background to make everything work together.

Original Design

Motivation

I really enjoy playing games. I also like rhythm games like DJMAX or jubeat. Recently I have came across a game called Crypt of the NecroDancer. I really liked its idea and I wish to create a simplified version of it by mixing it with one of my favorite mobile game: Mr. Oops. I really think it will be a blast and it will also serve as a great motivation for me to learn to make a game.

My goal is to create a simple, challenging, and endless game.

How to play?

DanceFloor is really a mix of 3 games:

  • Crypt of the NecroDancer: You can only move your character on the beat.
  • Mr. Oops: You have to avoid contact with objects at all times!
  • DJ Max: You lose your health when you did not move on beat.

The player is moved by the arrow keys. There will be no other keys needed in this game, except for SPACE to start/stop the game.

Challenges

  • Synching issues: due to its rhythm game nature, I have faced tons of problems dealing with synching issues. For example, I started with BPM90 and allowed eighth notes but due to it being too fast, my input for the current beat gets messed up by the next beat that is already here.
  • Game: this is my first time making a game. I've choose to use cocos2dx due to its cross-platformness and also I could apply what I learnt in Music256A to the code as they are all C++. A lot of time was spent on learning cocos2dx and game-programming concepts.
  • Engine limitations: the audio engine of this game engine is VERY VERY limiting so I have to work my way through getting things done. I guess I chose the current design of my system primarily because of the limited nature of the audio engine. In the version 3.3 of cocos2dx, there's a new experimental audio engine that is much stronger but there's still some major bugs. After trying it I decided to stay with what I have and design around it.
  • Music: I don't really have music background and I don't really know where to find these kind of stuff for my game. I was using loops from looperman.com in version 1 but in version 2 I really want to try something musical. Luckily, Fang Yi helped me created 7 awesome chords and 1 drum loop that I used in version 2 of the project.

System Design

DanceFloor consists of 4 components.

  • Chord engine: generate different beat patterns based on the chord given. A chord data structure stores its audio filename and its beat pattern. The chord engine also has the functionality to cut out notes in the chord pattern for adjusting difficulty. Note: Currently not included in demo app due to wrong chord pattern.
  • Tile engine: lay out everything in a tile grid including the inner map(walkable) and the outer map(enemies) with collision logic
  • Enemy engine: create enemies, handles enemy steps, increase difficulty over time, handles enemy fire
  • Main game controller: beat/keyboard sync, handles collision after user input threshold, visualization, synching, score keeping, game flow

Next steps: Polish the game

  • Chord patterns: the system is already being implemented. I just need some 4-chord or 8-chords and I can really demonstrate the power of player input in synch with the music.
  • Beat health: this was already in place in the previous version but I felt that this was too much of a distraction for the user so I took it out.
  • Tweak the game logic for better game play. Currently the game relies on random mechanics too much and the different plays are not very coherent.
  • Effects sound for input at wrong time.
  • Implement on iOS by replacing keyboard with swipe gestures, and changing the layout of the screen!

Some other stuffs I thought of but did not implement

  • Fever mode: Keep track and give feed back to the user when their input is right on beat. When the amount of "Perfect" and "Good" reaches a certain amount, the background color changes and everything becomes very fast. Most of all, you will not die in Fever mode. I did not implement this because I think the input accuracy feedback and fever mode is just a distraction from the core gameplay. However, when I have more time I would definitely love to try it and see the effect.

Download

Currently for Mac OSX only. Download here