Have several sound effects without cutting them off

SirCrocketz

  • Posts: 24
Hey guys! I'm working on a classic style tower defense where the player has to create the maze that the enemies walk through (think Sunken Defense from StarCraft UMS for example). Since I'm limited to only 32 channels, a couple of which are used up for music and dialogue, does anyone know of a solution for my problem? The player can have upwards of 50 towers at any given time, each one making a sound when it launches a projectile.

I currently have each tower playing on their own channel. Essentially a global variable increments when a tower is built and the tower grabs that number to determine what channel to play off of. One it reaches Channel 30 it resets back to 0. This means that some channels have more than one tower. To make things worse, I also have impact sound effects for projectiles based on damage and armor type.

Each tower has 3 different sound effects that it will randomly play when it shoots. I've thought about implementing a 'null' if the random integer is a specific value, lowering the number of sound effects played. I'm not sure...any thoughts? Should I upload a video?

xRANDBOx

  • Posts: 76
can you not assign each sound to a channel instead of a tower? like if tower does this play sound on channel?

if tower action 1 = true
     set volume for channel 1
     play sound for channel 1

if tower action 2 = true
     set volume for channel 2
     play sound for channel 2