Thread: New sun for project XSpace

  1. #16
    Join Date
    May 2004

  2. #17
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    neat-o sand_man, may i inquire as to the tools you used for that?

  3. #18
    Join Date
    May 2004
    Reason 2.0
    3.0 is being released soon. I think there is a trailer on the main page.

  4. #19
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Wow. Sounds great. Do you care if I add some reverb to it...some of it sounds too much in the foreground but other than that it is exactly the stuff I need.

    I'm not sure how much experience you have writing music in segments or DLS segments but that is what I need. I cannot explain all of DirectMusic here and how it works but I can say that my system looks like this:

    Music flow - Home sector - Terran system
    Ambient.........Silence for Random(x) minutes...........<repeat>

    1. Ambient from Ambient(x)...........Transition from ambient(x) to discovery(x)
    2. Discovery(x) till Elapsed(x) seconds or till Discovery state disabled
    3. Discovery(x) to Ambient (x)

    Possible transitions:
    1. Ambient(x) to Alerted(x) -
    2. Discovery(x) to Alerted(x) -
    Alerted(x) plays till threat has dissolved then transitions from Alerted(x) back to previous segment which could be Ambient(x) or Discovery(x)

    Possible transitions:
    Alerted(x) to Frantic(x)
    Frantic(x) plays until enemy dead or battle over due to range (player fleeing far enough from enemies), etc.

    Frantic(x) can then move back to state prior to Alerted(x). Alerted(x) always plays before Frantic(x). Once Frantic(x) state is over, we jump back to Alerted(x) to find previous state - could be Discovery(x) or Ambient(x).

    The x in all of these denotes that more than one score of this type is present for the engine to make use of. However, most segments will have their own transitions and/or transitions to other segments.

    All segments need a transition from one state to the other.
    struct MusicStateSeg
       CDXSoundSegment *Ambient;
       CDXSoundSegment *TransitionToDiscovery;
       CDXSoundSegment *Discovery;
       CDXSoundSegment *TransitionToAlerted;
       CDXSoundSegment *Alerted;
       CDXSoundSegment *TransitionToFrantic;
       CDXSoundSegment *Frantic;
    Ideally all of these should be able to transition to each other. If not I can create a state seg structure that will tell which segments the current segment can be used with.
    If only certain segments can be used with each other you will begin to notice the game repeating 'patterns' of music which is what I don't want.

    For instance let's say we are exploring home sector around planet earth.

    1. We are currently in Ambient(6).
    2. Some bad guys come within range and the system chooses Alerted(1).
    3. We need to transition from Ambient(6) to Alerted(1) - nothing huge, just a minor transition.
    4. If the bad guys start attacking let's say the system chooses Frantic(3). Now we need to transition from Alerted(1) to Frantic(3).
    5. Once we have dispatched the enemies, we need to transition now from Frantic(3) to Ambient(1) - or could just transition to Random(x) seconds of silence, and then choose a new ambient.

    So with this in mind if we have 6 segments for each state and 6 transitions for each state then we have:

    Ambient: 6
    AmbientToDiscovery: 6

    Discovery: 6

    Alerted: 6


    Then we have:

    2176782336 possible permutations for each segment and transition segments for the engine to choose from.

    possible permutations of music and transitions between states. Very nice, but not easy to do. The less the music is able to transition from one to the other, the quicker this number goes down and the more chance you have of repetition happening. The human ear is very good at picking up repetition.

    Keep in mind that the transitions from each state to the other don't have to be elaborate...just a cue to let you know the game state has changed and then the engine will play the music relative to the new game state.

    Halo does this very well as well as No One Lives Forever and Freelancer. Although Freelancer tends to be more repetitive.

  5. #20
    Join Date
    May 2004
    You can do what you want with that file. I can make whatever changes you want. Remember that is just a sample; I was going to re-arrange some stuff, add more instruments (maybe just 1 or 2 more) and make fix up the reverb and other things.
    But if there is anything in particular that you want changed just let me know. I'll let you know when I have worked on it some more.

  6. #21
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Well I loaded it up in Sound Forge and added just a tad of reverb and pitch bent it down. It is really slow now, but it sounds very awe inspiring and I get some really good quality low tones. Very very nice. You and I need to team up. I think we could create some very professional sounding stuff for this game.

    Very very good stuff man. I'm thinking about buying Reason, but I'm not really musically talented, but I know what good music sounds like. So if I bought it...would it help me make scores for games? It seems to me that most modern stuff is all about samples and loops which I can already create.

    I'm also going to upgrade my Sound Forge Audio Studio to the real deal....I cannot tell you how much Sound Forge has helped me in creating sound effects and loops. Very nice software.

    And man what a difference this ambient music makes in my game already. It really adds a lot to it. Wow.....I wish you guys could hear this and fly around my universe. I can't believe how much awe this adds to the whole scene. Unbelievable. Now it's starting to sound like a real space shooter/exploration game.
    Last edited by VirtualAce; 02-28-2005 at 02:08 AM.

  7. #22
    Join Date
    May 2004
    Haha I'm happy to help (I was actually scared someone was going to say "That sucks, I could do better").
    Reason can handle loops (preset or custom made) and samples (preset or custom made). It is extremely versatile because all propellerheads software is compatible with it. ie, they 'plug in' to it. I would say download a demo first because I'm not sure of the extent of creativity it can produce by just using pre-made loops etc.

  8. #23
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Ok I've made 4 more ambients. I need a few more. I can probably do the discovery ones as well, but I cannot do the alerted and frantic since those will require actual music and/or more upbeat stuff.

    Ok, the ambient music system is done. It will choose from as many scores or segments that you specify when you set the engine up.

    It's very simple to use once you have a valid CDXSoundEmitter object.

    void CD3DApp::InitAudio(void)
      //Keep music and sfx separate
      //Init CDXAudio here
      //CDXAudio Music;   - member of the class
      //Use 1 pchannel since we are only testing wav segments and
      //not actual DLS segs with bands, motifs, etc. 
      //Create sound emitter for music system
      //CDXSoundEmitter MusicEmitter; - member of the class
      //Create final MusicSystem
      //CMusicSystem MusicPlayer; - member of the class
      //Add songs/scores/segments
      //Could load song titles from disk here if needed
      //Start the system by letting it choose a song/score/segment
    void CD3DApp::Render(float fTimeDelta)
    That's it. Once you set it up, update handles the rest. It checks to see if the song is currently playing. If it is, it simply returns. If not, it adds fTimeDelta to the m_fElapsedSinceLastPlayed member. When this member is greater than m_fNextPlayTime (which was computed by Start() when we set it up), it picks a new song, resets the correct variables, sets elapsed to 0 and the whole thing begins again. You will always have at least 2 minutes of silence between songs. This seems to work quite well in the game and fits in very nicely.

    Although this screenshot does not show anything does show the new music system working.
    Last edited by VirtualAce; 02-28-2005 at 05:35 AM.

  9. #24
    Join Date
    Jul 2004
    That picture is great man; I'm more excited about information on this project than most professional games
    To code is divine

  10. #25
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Well there is a lot left to do but I'm going to use Blender to make the models so you should start seeing some models. I just have to test whether or not DX9 will read Blender's DX8 .x files or not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simulating The Sun In The Sky
    By SMurf in forum Game Programming
    Replies: 1
    Last Post: 06-04-2007, 10:30 AM
  2. Survival Football, ongoing! (GENERIC EXCITED TITLE)
    By PJYelton in forum A Brief History of
    Replies: 179
    Last Post: 12-14-2004, 10:19 AM
  3. Sun bursts and glows.
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 04-16-2004, 05:38 PM
  4. Sun Eruption....could this be armageddon??
    By Golden Bunny in forum A Brief History of
    Replies: 31
    Last Post: 07-08-2002, 07:21 AM
  5. HaHa Sun takes Microsoft to court
    By Megatron in forum A Brief History of
    Replies: 24
    Last Post: 03-09-2002, 09:21 PM