PedanticOmbudsman Trick Member
Joined: 07 Jan 2005 Location: Fayetteville, AR |
1. Posted: Mon Dec 05, 2005 7:51 pm Post subject: |
|
|
Both the DWI and SM stepfile formats use basically the same method, which is conceptually the same as just about every other music game.
The stepfile contains two important time-related values, BPM and offset/gap. The offset or gap precisely specifies the amount of time between the start of the music file and a beat of the song. If the offset is set to x milliseconds, then the game will consider the xth millisecond of the sound file to be the first beat of the song (it doesn't neccessarily have to be the first beat of the music, but it's typical).
Once the game knows where it should consider the first beat of the song to be, it uses the BPM value to know where the rest of the beats of the song are -- if the tempo is 180, it considers there to be a beat every 1/3rd of a second after the first beat.
Now, the BPM specified in the step file isn't always the actual tempo of the music -- the game can think that the tempo is twice what it actually is, or half of what it actually is, and things can still line up correctly because the steps are written accordingly. For example, the actual musical tempo of Bag is thought by many to be 130, but DDR thinks it's half that (65). Similarly, the actual musical tempo of MAX300 is thought by many to be 150, but the tempo of the steps is twice that, 300, i.e. there's an extra in-game beat between each of the actual musical beats. But most commonly the game is told the correct tempo about a song.
Here's what the actual steps in a .sm step file look like:
0000
0000
0000
0000
, // measure 2
0000
0000
0000
0000
, // measure 3
1000
0100
0010
0001
, // measure 4
1000
0100
0010
0001
, // measure 5
1001
0000
0110
0000
1001
0000
0001
0100
, // measure 6
0000
1000
0100
0000
1000
0000
0001
0100
,
etc
A measure is 4 beats. It's the commas in the file that defines where one measure begins and another ends. The first few measures of a stepfile will typically be empty because the steps generally don't start immediately when the song does.
In this example, in the measures with four lines, each line is on-beat. In the measures with eight lines, the odd lines are on-beat and the even lines are halfway between beats. If there were 16 lines in a measure, then lines 1, 5, 9, 13 would be the four beats of that measure; lines 3, 7, 11, and 15 would be halfway between those beats, and lines 2, 4, 6, 8, 10, 12, 14, and 16 would be halfway between the beats and the half-beats.
The actual lines of steps themselves are pretty simple. "0000" means no steps at that time. It's LDUR just like on the screen. "1000" means a left arrow. "0001" means a right arrow. "0110" means an up and down arrow at once (a jump).
Pretty simple, isn't it?
Well, there's more to it than that, but that's a quick summary of the basics. |
|