I am some what a newbie on GTF, but I am sure one cant put MP3 files into ones games. Now; me and my friend have made some MP3 music we would like to have in our GTF-made games. How ever, it seems impossible. Therefore we are in a desperate need of some one who could open our game in MMF (which I for some reason belive can be used for putting MP3-music into games) and ad the music, save the game and send it back to us. Can this be done, will anyone do it? If so, we would be very greatful.
Put it into your TGF directory.
Then put the file 'bass.dll' in your 'C:\Windows\System' directory...
Now you can use the extension to play mp3:s in your game...
TO play a mp3, do the following:
Go to the frameeditor of your game and create a DMC 2 object.
Go into the event editor and add the events:
- Start of level
-> (DMC 2) Ínitialize Bass
-> (DMC 2) Stream/ Open stream; (then input the filename for the mp3. example "tree.mp3", the mp3 must be in the same folder as the .gam file.)
-> (DMC 2) Stream/ Play Stream; (then input 1 to make the mp3 loop)
THIS ONE IS REALLY IMPORTANT:
- End of game
-> (DMC 2) Stream/ Stop Stream
-> (DMC 2) Stream/ Close Stream
-> (DMC 2) Terminate Bass
Thats it... hope i didnt forget anything, just ask again if it doesnt work!
Deleted User
25th May, 2006 at 21:12:15 -
When you want to share your game with others, like upload it on this site, dont forget to put the 'bass.dll' in the games folder... along with all mp3-tracks used in the game!
Btw, this must be included in every frame:
- End of game
-> (DMC 2) Stream/ Stop Stream
-> (DMC 2) Stream/ Close Stream
-> (DMC 2) Terminate Bass
DMC2 is allright for playing mp3, but some people seem to have problems with it crashing the game and stuff like that. Try the ModFX objects, they don't suck. I think.
n/a
Deleted User
25th May, 2006 at 22:43:02 -
Heh, i have never used ModFX so i dont know.
But DMC2 has always worked for me. The reason it may crash is if you forget to put the stop/close/terminate mp3 at the end of the game... If you just do that, it SHOULD work.
Oh, im sorry.
Im too used to MMF! ^^
I just meant the Level Editor(Frame Editor in MMF), when you put out the objects and backgrounds.
Click the 'Create new object' icon and then create the DMC 2 object. Just place it anywhere in the level. (To do this you must first have downloaded the extension DMC 2 and put it in the same folder as the TGF .exe file)
Then go to the Event Editor and create the events that i posted above.
Hope you can figure the rest out...
Every thing should work by now, I have placed all the DMC2-files where you suggested, but when I run TGF and check for the DMC2-object, I cant find it. Should I do something to get it there or should it just appear?
Hehe, now the Mp3-sample wont stop looping! I have inserted all events you told me to put under End of Game. When I run the game via TGF, the sample wont stop looping when I complete the level or even when I go back to editor mode in TGF and don't run the game anymore.
That happens sometimes, if you want it to stop then add an event that stops/closes/terminates the mp3 at the end of the level also. But then it wont loop to the next level...