#199 closed task (fixed)
Hook up the SoundGroup system
Reported by: | Jan Wassenberg | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | |
Component: | Core engine | Keywords: | sound |
Cc: | Patch: |
Description (last modified by )
The SoundGroup system for choosing random sounds is not yet in use. The current placeholder code enumerates all audio files in a certain subpath, which works but is slow and inflexible (see http://www.wildfiregames.com/forum/index.php?showtopic=10924&hl= for an overview and list of links that detail the sound system design).
Here's a list of what I think is necessary to get the SoundGroup show on the road:
- during init, create all the sound groups we'll be needing (e.g. attack grunts, death, ...) and associate them with entity classes
- .. by storing a string or index that identifies the sound group in entity.traits.audio.path instead of path (as now)
- create a script interface for the SoundGroup that allows calling it from our Javascript event handlers (this is where the performAttack logic runs). This kind of thing is pretty much boilerplate, we can refer to stuff like JSI_Sound.cpp to get an idea of what to do.
- replace newRandomSound with the corresponding new function that basically just calls CSoundGroup::PlayNext
- add a call to CSoundGroupMgr::Update in the main game loop
Change History (3)
comment:1 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
already completed, marking as closed..