Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the best way to program a rhythm based game in XNA? (Some sort of game like Dance Dance Revolution) Would you use the built in GameTime? What logic would you use to make sure the game constantly stays in sync to the music? Any tips would be much appreciated!

What I am basically asking is how you would keep the gameplay in sync with the music. For example in DDR how would I correctly sync the arrows to the beat of the music?

share|improve this question

In XNA it should be simple as the mediaplayer class can report its position while playing back something, use that position (at least that's what I did when I did a 2D scene playback that had to sync perfectly to a music track). It can also be set, so you can do decently accurate scrubbing.

share|improve this answer

You can use as a base those midi trackers for xna:

this way you can do a perfect sync with the notes in an easy way.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.