Monday, January 6, 2014

Sound Manager

I am trying not to code first and think later as of recent. A bit of planning is useful to avoiding easily foreseeable
complications in the future.

Should my Sound manager own the music tracks that are in the game?
Answer: Seems like a good idea.

Why should the sound manager own the music tracks, but not the soundFX?
Answer: This makes sense. As soundFX can be class/system specific.
For example, explosion SFX around bound to my explosion-grid system that manages
explosions in the game.

Where should music be derrived?
1. Add it to my assetRegistry, just like all the other assets.
2. Add it to a special MP3 registry.

Arguments for 1:
1: I already have the structure for this in place.
1: By coupling music with AssetRegistry, it may be tricky business to load all assets except the music,
   and then to delay music download until you need it. (Streaming Music or downloading more tracks while game plays)

Argument for 2:
1: Can specially design the music registry to stream tracks of music.
2: Application re-skin can be done, without need of swapping music track references.
2: I have to do more coding to get this working.

I like #2 better.

1. The music manager WILL own the music tracks, but not the soundFX.
2. The music will go into a special musicRegistry that is separate from the assetRegistry so that
   music can be loaded AFTER you are already playing the game.
   A: How to I configure music loading so that at least one track is loaded during the pre-loader???

No comments:

Post a Comment