Acid Reflvx
Member
Hi,
I've been creating a rhythm game with a level editor, and I've added a feature that allows you to import .ogg files from your computer as the level music. I've recently set it to encode the things you make in the editor into numbers, and then list those things in a .txt file. That way you can open the level in newer versions of the game. Doing this, I've run into a problem, how do I save the music? I could just save the directory of the music along with its name, but what if you want to share the level with your friends and they don't have the audio in the same directory as you? I got an answer about this on another thread, but it was complicated, and I didn't have motivation at the time, so I decided to save the name of the .ogg file at the beginning of the level's list. Then, when playing the level, it would look for a file with the same name as what was saved in the list. The name of the file without a directory gave me an error, so I decided to use filename_path to find the first file with the same name and return its directory. I then connected the directory to the file name and tried to play that, and now I'm getting this:
- In GameMaker, it opens up the Y:\ drive, which I don't even use, and then it gets the file from there.
- As an exe, it seems to save the ogg in its text file with all the game data, and accesses it from there.
I would be fine with this happening, but when I try playing the music in the GameMaker build, it says:
audio_create_stream : could not file file 'Y:\[gamename]_[randomspam]_[2randomletters]\Y:\[gamename]_[randomspam]_[2randomletters]\[audiofile].ogg'
If you know anything about how to retrieve files from the correct place, please share it with me. I've been thinking that maybe it should just ask what drive it should look on the first time you open the game, but I feel like people would think it's a virus, and you could have the audio on a different drive. If there aren't any great ways to do this I think I'll just do the complicated way, but I really don't want to spend a couple months on it.
Thank you!
I've been creating a rhythm game with a level editor, and I've added a feature that allows you to import .ogg files from your computer as the level music. I've recently set it to encode the things you make in the editor into numbers, and then list those things in a .txt file. That way you can open the level in newer versions of the game. Doing this, I've run into a problem, how do I save the music? I could just save the directory of the music along with its name, but what if you want to share the level with your friends and they don't have the audio in the same directory as you? I got an answer about this on another thread, but it was complicated, and I didn't have motivation at the time, so I decided to save the name of the .ogg file at the beginning of the level's list. Then, when playing the level, it would look for a file with the same name as what was saved in the list. The name of the file without a directory gave me an error, so I decided to use filename_path to find the first file with the same name and return its directory. I then connected the directory to the file name and tried to play that, and now I'm getting this:
- In GameMaker, it opens up the Y:\ drive, which I don't even use, and then it gets the file from there.
- As an exe, it seems to save the ogg in its text file with all the game data, and accesses it from there.
I would be fine with this happening, but when I try playing the music in the GameMaker build, it says:
audio_create_stream : could not file file 'Y:\[gamename]_[randomspam]_[2randomletters]\Y:\[gamename]_[randomspam]_[2randomletters]\[audiofile].ogg'
If you know anything about how to retrieve files from the correct place, please share it with me. I've been thinking that maybe it should just ask what drive it should look on the first time you open the game, but I feel like people would think it's a virus, and you could have the audio on a different drive. If there aren't any great ways to do this I think I'll just do the complicated way, but I really don't want to spend a couple months on it.
Thank you!