Audiokinetic Wwise Knowledge Base

How do we reference events in game?

You can either use the event name (strings) directly or you can use Event IDs.

The overhead cost of using strings is pretty low (The sound engine does not keep strings internally, it is using a hash function to quickly compute strings into unique IDs ). But for game that ends up having many thousands of events name, keeping some sort of string on the game side may become an issue. In those cases, what we suggest is to use strings for game development time, an in the end (when sound design is finished and stabilized), (and only if required), you can save some memory on the game side by replacing some strings by their pre-hashed IDs.

The best way to avoid re-building the game then the project change is of course to use strings.

When generating banks, you have the option to generate a .h header file containing an entire mapping of all the IDs that can be used in the project.

Note:
In the SDK, we provide the source code of the hash function.




Article Details

Last Updated
19th o March, 2008

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Continue