| Mirage Source http://web.miragesource.net/forums/ |
|
| Music In Game http://web.miragesource.net/forums/viewtopic.php?f=201&t=3782 |
Page 1 of 1 |
| Author: | William [ Fri May 30, 2008 11:52 am ] |
| Post subject: | Music In Game |
So i've been pushing this matter up for too long now. I currently use fmod and have a simple music system setup in the game that allows for attack sounds, getting hit sound, bkg sound, equip sound. 1. I really don't like fmod, cause it's not fully unloaded if you encounter a error in the client source. So it shuts down the vb program and if things wasn't saved. They are lost. Dave looked into this before cause I beleive he didn't beleive me. Any other methods that doesn't require much effort for the players you know of? What I mean is I don't like dlls and such cause they can't register it. But I know, dlls are needed xD 2. I'm considering not setting a certain track for each map, instead I was thinking what if I have a list with k2h songs. And you can choose which track to listen to. And you can add which of the onse you want as a main ingame song, so that song will be repeated. Or you can just use shuffle or from top to bottom in the list. And of course you can choose no music at all. Is this a good idea? Please brainstorm on the music idea in the game, cause I hate dealing with music in the game. But whatever. Just help me out ^^ |
|
| Author: | Asrrin29 [ Fri May 30, 2008 12:11 pm ] |
| Post subject: | Re: Music In Game |
I use http://www.shrinkwrapvb.com/ezaviocx.htm This is a very small and simple .ocx that can playback, pause, and loop sound. The only problem I have noticed ever using this is that the game slows to a crawl if you have a music program opened up in the background and you have music running, though that may be my hardware causing that (not being able to handle two audio streams). |
|
| Author: | William [ Fri May 30, 2008 12:27 pm ] |
| Post subject: | Re: Music In Game |
Quote: Freeware ActiveX Control offers total control over AVI file playback on Win9x and WinNT. You have to try it to believe how cool it is!
|
|
| Author: | Asrrin29 [ Fri May 30, 2008 2:08 pm ] |
| Post subject: | Re: Music In Game |
it works with mpeg, mp3, wav, and midi as well, don't let the title fool you. trust me, it was one of the first things I put in my code. Code: Sub PlayMusic(ByVal MusFileNum As String)
frmDXS.aviMusic.FileName = App.Path & "\Music\music" & MusFileNum & ".mp3" If Map.Music > 0 Then frmDXS.aviMusic.Play End If End Sub |
|
| Author: | William [ Fri May 30, 2008 2:36 pm ] |
| Post subject: | Re: Music In Game |
What I ment was the win9x and nt, but I noticed that was only for avi files, right? You have MusFileNum as a string? Isnt it supposed to be a number? So perhaps as byte? |
|
| Author: | Lea [ Fri May 30, 2008 2:49 pm ] |
| Post subject: | Re: Music In Game |
His code is fine and should work. Look how he uses that MusicFileNumber... just for the path of the file. As far as I know, there is no way to stop FMod from crashing VB in the debugger. When I used it, I just verified FMod was working, then commented out the initialization. |
|
| Author: | William [ Fri May 30, 2008 3:04 pm ] |
| Post subject: | Re: Music In Game |
Dave wrote: His code is fine and should work. Look how he uses that MusicFileNumber... just for the path of the file. Of course it works, you can store numbers in a string if he now uses numbers for his files, what I was saying was his using a numeric variable name Im going to check this thing out. And see what it is. Do you know if the file needs to be registered for some? Cause I didnt need to. |
|
| Author: | GIAKEN [ Fri May 30, 2008 6:39 pm ] |
| Post subject: | Re: Music In Game |
Just use DirectSound7 and DirectMusic7. |
|
| Author: | Asrrin29 [ Fri May 30, 2008 6:47 pm ] |
| Post subject: | Re: Music In Game |
windows nt is nt4.0, 2000, XP, and vista. they are all based on the nt code. I could change the way I keep my files, but I do it similar to PW style. I have music files labeled music1.mp3, music2.mp3, etc. and that numbers help keep that in check. It's simple and doesn't require a lot of overhead to find the files. that's only part of the code as well, you also need to add code to check when moving to a different map and etc. I just threw out that snippet so you could see how I make it work. All you need to do is add that ocx to your project, add the control onto a form, and then start using it. |
|
| Author: | William [ Fri May 30, 2008 9:55 pm ] |
| Post subject: | Re: Music In Game |
Im considering having all my tracks in a list so the players can choose what to listen to. |
|
| Author: | Rezeyu [ Fri May 30, 2008 10:28 pm ] |
| Post subject: | Re: Music In Game |
If you don't want DLLs, go with Directsound/Music as GAIKEN suggested, or use WMP as Robin will probably say, since obviously the user has DLLs for both of those if they are playing your game. Unless they're emulating windows, but chances are those users know how to register a DLL. XD |
|
| Author: | GIAKEN [ Fri May 30, 2008 11:23 pm ] |
| Post subject: | Re: Music In Game |
I used to have WMP set up in my source, but it's not really good...the main problem was that if it was loading and the program shut down, it would still load the song and play it in the background until it was over, even if the program wasn't running...but DirectSound/Music is ran through the program, so you don't run into any problems like that. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|