This is Rhett Dobson's ongoing web log of Summer 2008's NSERC-sponsored study of Exertion Interfaces. This project was started by Bruce Gooch at the University of Victoria. I'm a Music/Computer Science student here, going into third year, and I'm doing this co-op term for the summer. In particular, I'll be taking over a nine-man project that was building a modified Dance Dance Revolution machine, with added features such as online stat pages for players, hand sensors for extra in-game steps, and fresh graphics and songs. We are building upon Stepmania 3.9's Linux source code. I'll update this page daily, and maybe make it look a lot nicer in the coming days.
8/12/08:
I came back to my old step converter code. I thought I finished Version 3 but I guess I forgot about it. Well, it is now safeguarded against accidentally trying to copy something that matches the right difficulty. For example, if there already was Hard steps for Single, and you tried to convert Hard Solo to Single, it might find Hard Single first and try to convert it as if it was Solo. Although, having accomplished that, it seems sort of folly, if one already has Hard steps for Single...plus, having two copies of steps can do weird things in Stepmania. I know that you can select all of them separately in game mode, but you can only edit one of them in the editor. The only thing wrong with this code is that it forgets to write the rest of the stepfile, as well. Well, at least it's here now. Coming up soon is the rest of the sounds and new music...I've been looking for inspiration the past few days.
SMConvert3.java
7/25/08:
After my quick interview with Meeta (the co-op coordinator) I worked on some sound effects. Not much improvement here but I'm not done all of them yet. I want to try to get a paper-like sound for scrolling between songs but I couldn't find a good sample so maybe I'll just record one tomorrow or something.
Two new sounds:
7/24/08:
I spent the day at home, which was a bit silly since I just dropped my MIDI controller off at the lab. Well, I'll be joining up with it tomorrow. I finished a new batch of sounds, some of which are improvements on old ones. I imported these into my personal copy of Stepmania to critique them myself and this has helped a lot.
7/22/08:
How has it been so long again? Anyway, Landon and I did indeed work on the pads; we started a second one because we were waiting for our plastic squares to be re-cut and now they are almost equally built. We got a new drill so things should proceed smoothly. I'll be working on them on my own soon but not yet. Tomorrow I'll resume working on new sounds for the theme. I also got to say hi to Bruce, which was nice, I usually don't see him around. I should stay here all afternoon more often.
7/16/08:
Sorry for the lack of updates, I was back home and at a sort of "business conference" in Calgary last weekend...got to see some of the best DDR players in Canada. It's strange to think I might have been in charge of the future of rhythm games if it weren't for UVic claiming patents and rights to everything that is borne from this project.
Anyway, Landon and I will be resuming the building of the pads again. Hopefully Landon will get a new drill soon as our current drill has lousy battery life and it is sort of a bottleneck for work. I'll be studying the tutorial videos we found a lot these next few days because I may need to work on the pads alone too.
6/24/08:
Though Chapter 3 was an easy read due to it being a review of C, it was long and took a while. The next chapter was more design-oriented and took 8 hours, almost as long. I talked to Lynn again (and Paul too) and they are optimistic that the hand sensor can be made to be read like a button press for the controller, but I think I need to try and understand electronics and our pad design a bit better before I talk to them again >_>
I'm flying back to Regina, and I'll be gone for about a week, but I'll keep reading this online book while I'm away, and I've confirmed I can SSH to the local Linux box just in case I feel I need to do something on there remotely. I have an idea for a completely unrelated C++ program that might test my new chops, and I'd make it object-oriented too, even though the behaviour I'm trying to model is from a game made in 1989 and was (surely) written in very low-level procedural code, trying to cram things on to a Game Boy cartridge. ...I've said too much.
6/23/08:
Spent 12 hours in ECS here. Read some more of Thinking in C++, should be finished Chapter 4 by tomorrow. Got in touch with Lynn in the Technical Support Office/Workshop, who will hopefully help me with these hand sensors tomorrow.
6/21/08:
I had some time to think about the new version of SMConvert. If I'm looking for a specific difficulty to convert, say converting Hard steps from single to solo, it's okay to assume that there won't already be Hard steps on solo, or else what would be the need to convert? I could either:
1. Print "there's already " + difficulty + " steps for " + sMode + ", move or delete them in Stepmania" and exit the program
2. Find a more advanced way to get around it. Though it's rare and nobody writes them, it's possible the stepfile might contain dance-double or dance-couple steps. Because I have nothing but time on my side, I'm going to go for this option. This may involve restructuring the code somewhat, so I'll put it on hold a bit longer to think about it some more.
But since I also read Chapter 3 of Thinking in C++ (talks about old C and its relation to C++) I think I'll be ready to just code version 3 in C++. The author got around to talking about file I/O very early on, so if I can find a list of methods in the string library, and if it has powers equal to that of Java's, the conversion should be easy as pie. All this reading ate up another 8 hours...on Sunday I'll either read a bunch more or make some more sound.
6/20/08:
Read Chapter 2 of Thinking in C++. This took 8 hours.
6/16/08:
Reading! Lots of it! Finished Chapter 1 of Thinking in C++, though it only talked about design with regards to object-oriented programming languages and didn't get into any C++ syntax. I wanted to read this anyway because I felt this whole topic was rushed in my Java courses. "Well everything's an object and then there's inheritance but whatever you don't need to know that etc etc". This particular line explains why I can't find anything in Stepmania's mostly undocumented code: "Don�t fear that you�ll end up with procedural-style spaghetti code -- classes partition the problem and help control anarchy and entropy. " I can't imagine the program running anywhere because everything is a highly generalized object that can jump in at any moment. Kind of Zen-like, really.
I worked overnight for 12 hours to also work on a slightly updated version of the step converter, with some mild Exception checking to try to make errors look nicer. In the process I discovered a major bug I had overlooked: the program foolishly looks exclusively for difficulty first, but it may try to copy the wrong type of steps to another! I'll resolve this tomorrow. I also tested that Edit-difficulty stuff; it works. And these webpages use CSS now, which explains the new font.
6/15/08:
The weekend came early for me but I was planning to work on Sunday anyway. I should mention that on my way home from work on Friday afternoon, I stopped by Landon's place and we worked on the pads a bit by cutting some two-by-fours into 33" lengths, which we need for the base of the pad for the wells the arrow sensors will lie in.
I was here for 4 hours, thus completing the minimum 40-hour week (8+12+16+4...I could keep this up) and I checked Stepmania's code to see if I could find how they converted step styles. I did find a relevant piece of code in EditMenu.cpp, but I think I'll have to look at it in a full-blown development kit to find out where to go next.
else if( GetSelectedSourceNotes() ) { m_Actions.push_back( ACTION_COPY );
void push_back(Object o) {
Styles g_Styles[]=that dictates the order of columns for all the game modes, Solo included. It may be necessary to change this for displaying the diagonal directions on the outside but I think that would be changing the internals too much when really I'm just trying to change the way it looks. SM files are written in a certain way, and it's certainly futile to try and change it on that level...
06/11/08: (the date refers to what day it is when I start working)
I decided to do something a little more normal and start at 9...9 PM, that is. I've decided to roll my sleep cycle forwards in a "larger than 24 hours way" but this will hopefully be a temporary arrangement. I have to remember that looking things up in the Java API can be very distracting...but I did stay long enough to say hi to the other RTFM guys who are working on robotic puppets. They showed up at 11:30 and I stayed after that to make a second version of the converter code. At 1:30 PM I was getting hungry so that's when I decided to leave. Anyway, I had some luck writing my initial dance-style converter. In the first version, I didn't attempt any kind of file updating and let the loose step data collect in another file.
I'll briefly explain why I wrote my own step converter instead of sticking with Stepmania's. Stepmania can convert just fine, but I don't like the way it does so. Single style has Left-Down-Up-Right for directions, four columns. Solo has Left-UpLeft-Down-Up-UpRight-Right. What Stepmania will do when going from Single to Solo is take your meticulously placed Single steps and align them exactly in the first four columns, so you'll see a muddle of steps for Left, UpLeft, Down and Up while UpRight and Right contain absolutely nothing. Since we're using UpLeft and UpRight as the inputs for our hand sensors, this betrays the nature of the original single steps completely and can lead to bizarre double-stepping (using the same foot to hit steps twice in a row, it is very annoying and uncomfortable at high speeds) or maybe impossible hand motions. As for converting Solo to Single, it does so in a completely bizarre fashion; my converter simply ignores the UpLeft and UpRight columns, allowing my Ninja Rhythm Challenge (NRC? has a nice ring to it) steps to be easily converted back to DDR if I were interested in doing so.
The code is far from perfect in both of them, however. I could certainly cut down on the number of lines, maybe make it more idiot-proof, and try to fix that one annoyance in the second version (temporary file refuses to be deleted). The option for "Edit" difficulty hasn't been tested but people don't use it very often these days...I find it can be glitchy in Stepmania sometimes. I have two screenshots depicting the code in action, and here are the four files so you can see how the code changed them. They'll work in Stepmania, too, if you want to go that far! I tested them too. Mock me all you want for using Java, but I got screwed on my final Software Engineering assignment this spring because of my unfamiliarity with the chaotic nature of strings in C. I had my program working fully, except the test cases expected me to add a period to the end of every number, including integers. As I set out to do this, I proceded to break my code so hard I could not make it work again. That'll teach me to use CVS. But yeah, Java implements strings wonderfully...adding that period would be a simple
string + ".";
so I figured I could just implement this in Java because that's easy enough for me. I never did figure out file I/O in QBasic but that would be a step up because it would be faster. Just kidding, a simple Java program like this runs Fast Enough (actually it's O(n), where n is every line in the .sm file). Ideally, I'll write an even better version, and then learn enough C++ to rewrite this Java code in C++. And then, if I feel especially crazy (and very comfortable with our team's SVN server) I'll try to integrate into our custom version of Stepmania, replacing their own step conversion algorithm. Or maybe by the time I find theirs, I'll look at it and go "Huh. That's actually a lot more efficient. Guess I'll just change 1 or 2 things here." and be done with it.
On a more whimsical note, Co-op department sent me an email asking me what my position title was. Since no one told me one, I asked around for some ideas for a bit before deciding on my own initial idea: Dread Warlord of Research. "Lord of the Dance Dance Revolution" came in a close second though...
06/10/08:
Argh, I was here for almost 12 hours but it doesn't quite show because I spent some time traveling to and from Landon's house (he lives walking distance away from UVic, but still). We built two metal squares for the pad, pictures to follow shortly once Landon sends them to me, and after that I walked back to UVic and made some of the music like I said I would. Well, more of it was sound effects, actually. Stepmania doesn't require all that much in-game music, but either way, I've decided to take an emphasis on pentatonic scales, "Chinese pentatonic" in particular (scale degrees 1 2 4 5 6). I created a /sounds directory here to store them all, but since it's going to fill up with more files I'll go into detail about what I made today:
Man, designing sound in a music program is hard. (I'm using my own copy of Reason 3.0, in case you're wondering). I think the server nucleardog.com is on is currently located in Texas so the time stamps are two hours ahead. Oh, and I showed up just in time to meet with Landon and Anna, one of the graphics designers. Anna suggested several titles for the game and the one I like is "Ninja Rhythm Challenge" because the group decided early on to go with a ninja theme. We're fun and crazy like that. Speaking of the group, I'd better send an email to see if they think the sounds are any good...
06/09/08:
Don't really have anything to show for today, except forming my ToDo List and this web page. I searched the Stepmania source a bit for the source file that implements the Flip mod, or the part that displays the targets at the top...we're using Solo mode, a 6-column play mode and I'm trying to re-arrange the targets so that the regular DDR steps will be displayed in order (left, down, up, right) and with the hands on the outside. No luck yet, but maybe once I finish reading this online book (Thinking in C++, by Bruce Eckel) I'll have a better idea of what to look for. That's right, I'm involved in a game project written in C++ when I don't know much C++ of my own. But this book looks quite solid, I'll probably learn my fill in time.
I was here for 8 hours today, but I'll be staying even longer tomorrow. As for the ToDo List, right now these things are on it: