I am having a lot of trouble implementing a new feature for my game. First, some background: I have a karaoke game…
http://singthegame.com
In the game players sing into mics, the game does pitch detection, and scores them by comparing their pitch to the original artist. To play the game you need a song file (MP3, etc) and also a note file. The note file is created by the “Note Editor” that comes with the game.
Currently there is a “song” directory and a “notes” directory. To play the game with a song, you need to have a note file for that song and place it in the “notes” directory. Then you need to place the song file into the “songs” directory and name it exactly like the note file (except for file extension). Eg:
notes/Michael Jackson - Don’t Stop 'till You Get Enough.notes
songs/Michael Jackson - Don’t Stop 'till You Get Enough.mp3
Simple right? Well, simple to code, and simple for computer savvy users. Most users have a lot of problems with this approach:
-
After they download the game, if they run it without copying and renaming their music, the game has no song files and so they can’t play right away, they have to figure out what to do. I have some brief messages explaining what to do, but people still get stuck.
-
Some people can’t figure out how to copy files around. Some users don’t know where their music is (eg, “it is inside iTunes right!”).
-
If they do get as far as copying their song files to the “songs” directory, they often are unable to name the song files exactly like the note files. I’m guessing they don’t use copy and paste. Currently the game requires the file names to be identical, except for case.
-
If they do figure it all out, they generally don’t like keeping their music in two places on their computer.
So that is my problem. I want users to be able to point the game at their music folder(s) and have it automatically match song files to note files. This way I can build a wizard so when the game is first run, it helps them choose their music folder, then they can immediately play the game with songs that match. If the auto matching doesn’t match or matches wrong, I guess I need a tool where users can manually match songs to note files.
I have started building this using Lucene. I index all the note files (which are named “Artist - Song Name.notes”), then I do a search with each song file (which could be named anything!). I don’t have auto matching yet, but it would just pick the top result. Right now it just suggests note files. It looks like this so far…
http://singthegame.com/misc/org.gif
This has a few issues.
-
I’m not sure if the workflow should be “pick a song, add note files to it” or “pick a note file, add it to a song”. I went with the former because a song can have multiple note files (eg, for a duet, or one for lead vocal, one for chorus, etc). I could try to make a UI that can go either way, but that can get complicated. I do want to try to avoid showing note files assigned to a song by selecting them in the main note file list because I would have to allow multi select and with such a big list (300+) it won’t be clear if more than one note file is selected without scrolling up and down the whole list.
-
I’ve played with ways to index and search in Lucene. Eg, if I have the song “Aerosmith - Crazy.mp3” it matches to “Aerosmith - Crazy.notes”. However, “Aerosmith - Carzy.mp3” (misspelling) does not match. If I use fuzzy matching (Levenshtein distance) then it matches, but fuzzy matching causes false positives if I didn’t actually have a “Aerosmith - Crazy.notes” file. I can’t possibly do auto matching with fuzzy turned on.
Do you guys have any input? Can you think of any similar problems you’ve encountered that maybe we can borrow the solution from?
Basically, I just don’t have a clear vision for how to implement this feature. On the surface it seems relatively simple, but when I try to solve it, I just get discouraged. I don’t know if I’m just stressed / depressed / mental, but I’ve tried a few times over the past few weeks and I just can’t get past this problem. I normally program every day, so it is unheard of for me to go over a week without coding, but that has happened multiple times now. There are other things I want to work on for my game, but none are as important as this. I don’t want to move on to other features or other projects without finishing this.