GithubHelp home page GithubHelp logo

Comments (3)

Zakru avatar Zakru commented on June 8, 2024

The obvious approach is to aggregate the sound events over a tick instead of starting playback for each event. The ambiguous part is how to play it back. A naive way would be to average the positions and play the sound once at that point, but that would begin to present problems when there's fighting all around the map, so that wouldn't work. But I think there are some things you could do to avoid the issues.

One way would be to only count the sounds that are currently audible in the player's view. That way the sound would definitely play in a logical area, but it would mean when you pan to another area, no sounds would be playing. Optionally we could keep track of the positions that every aggregated playback instance came from, and adjust the playback based on the average in view every frame, instead of ignoring everything out of view at the time of the event.

An improvement regardless could be to scoop up bunches of the event based on a radius for example, to reduce the density so we have less information to deal with.

from game.

JackCrumpLeys avatar JackCrumpLeys commented on June 8, 2024

How about the closer the sound the higher the priority and we play the top 25 sounds. Maybe also decrease priority for duplicate sounds.

from game.

Indy2222 avatar Indy2222 commented on June 8, 2024

How about the closer the sound the higher the priority and we play the top 25 sounds. Maybe also decrease priority for duplicate sounds.

Prioritizing based on camera distance at the time of the sound start makes sense.

from game.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.