Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mod Support: Support custom sound events #7299

Open
Kaffeine opened this issue Oct 5, 2023 · 2 comments
Open

Mod Support: Support custom sound events #7299

Kaffeine opened this issue Oct 5, 2023 · 2 comments
Labels
enhancement Provides an enhancement to the game. meta-discussion Discussion about the project itself, direction, (code) design, etc network Network related.

Comments

@Kaffeine
Copy link
Contributor

Kaffeine commented Oct 5, 2023

Feature request: support a netmsg to play a custom sound (e.g. embedded into the map or downloaded via #7296).

We'd want to play a sound at a certain position (like NETEVENTTYPE_SOUNDWORLD does) or globally, like it does NETEVENTTYPE_SOUNDGLOBAL.

Right now most of the mods have to use flag captured/drop/returned global sounds to announce important events, and re-use default sounds for our custom events. The biggest issue is that there is no sound which would fit certain use-cases. E.g. I need a short alarm/warning sound to warn the player about a building destruction (similar to a bomb timer 'beep' sound). I'd also like to use custom sounds for the many custom weapons/objects.

I think this does not strictly require #7296 as we can use the map embedded sounds for now. I'm yet to come with a detailed plan (can take days), feel free to suggest it.

Would it make sense to reference the sounds by SHA256 or we'd prefer short string names or something else?

The server can send an indexed list of custom sounds and use those indices instead of sha/names. Another benefit is that (later) the client can use the list to download the missing assets (#7296).

@Kaffeine Kaffeine changed the title Mod Support: Allow custom sound events Mod Support: Support custom sound events Oct 5, 2023
@fokkonaut
Copy link
Contributor

All of that is possible using #7042 (comment)
But again, no official answer from ddnet, so...

@Kaffeine
Copy link
Contributor Author

Kaffeine commented Oct 5, 2023

All of that is possible using #7042 (comment)

Some forks have server and client side LUA support but there is no code implementing a communication channel between the server-client scripts. Having that in DDNet is a too distant, complex and very questionable goal.

Do you mean that you'd prefer to have it this way: server-side LUA sends custom event to the client-side LUA and the client script parse it and plays the sound?

@Robyt3 Robyt3 added enhancement Provides an enhancement to the game. network Network related. meta-discussion Discussion about the project itself, direction, (code) design, etc labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Provides an enhancement to the game. meta-discussion Discussion about the project itself, direction, (code) design, etc network Network related.
Projects
None yet
Development

No branches or pull requests

3 participants