I'm starting to program my very first game, it's a clone of DDR/Stepmania done for research purposes and learning.

I (at this early stage) get most of the UI/Music/input work that should be done, but what i still can't grasp is scripting, i've read about Lua and that you shouldn't use it with XNA/Monogame as C# is capable enough, but i cannot get the utility of it.

Assuming the needs of my game, What would be the ideal way to implement the input sequences it needs?, i thought of XML/Json, let's say Stage 1

 <level id="1">
  <step id="1" key="up" time="00:00:01"/>
  <step id="2" key="left" time="00:00:02"/>

Is that a correct implementation? or are there better ways with more benefits?

  • \$\begingroup\$ Scripts are fine, it's a nice way to be able to easily add additional content later (including users being able to add their own). I haven't played DDR, but from what I understand, you can basically count on the steps being at discrete intervals. With additional and faster paced steps on harder difficulty levels. So you may want to include multiple difficulty options per step, and make sure you've allowed for multiple steps per tick. \$\endgroup\$
    – House
    Oct 17, 2013 at 13:59
  • \$\begingroup\$ I play stepmania. The .SM file format is plain-text and I think the game has some built-in stepfile editing tools. Here's a link to the format of the files: stepmania.com/wiki/The_.SM_file_format I don't see any benefit to using a script to store what is merely data. \$\endgroup\$
    – josaphatv
    Oct 17, 2013 at 21:37

1 Answer 1


There's no reason to use a script if you're just storing time-based data.

There's many different ways you can design a file format for your data. As long as you can load it into the game, whether you used XML, binary, plain-text, etc, is not very relevant.

As long as your format allows you to add new information without breaking the previous format (during development this doesn't really matter) or rewriting your parsing,

What I'd do is store each song in a folder, containing an mp3, background image and/or video (if applicable), and my level files. Having a new level file for each difficulty, and having each one have it's own reference to the mp3 and other assets, allows users to easily share any difficulties that they've created by sending each other just the level file.

As for the levels themselves, you'll want to store data such as the offset for the song (the amount of silence before the song starts. It's rare to find a song that doesn't have this) and other metadata. You'd probably also want to store the speed of the arrows, and allow the BPM to be changed at any point in time during the song.

Also, it's more crucial to have a good, functional level editor in rhythm games than it is in most other types.

  • \$\begingroup\$ Thanks, how would you track user input? say, creating a list of steps and assigning a bool to each one? \$\endgroup\$
    – FuuRe
    Oct 18, 2013 at 18:58
  • \$\begingroup\$ I'm not sure I understand what you mean. Assuming you mean saving a user's score, you could give different per-step scores for each step, depending on how accurate the user was. (Perfect, Good, Decent, Bad, Miss etc.) You could also have multipliers for how long the user has gone without missing a step, etc. It's entirely up to you. \$\endgroup\$
    – l'-
    Oct 19, 2013 at 4:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .