2019-04-02 00:56:23 (edited by nolan 2019-04-02 00:57:08)

I'm building an Asteroids-style shooter. I have enough of everything working that I can fly around in an environment and shoot things. Now that that's the case, I'm discovering just how busy the environment is, and I'm wondering if anyone has tips to make it a bit more manageable?

Gameplay is pretty simple. You fly around a 2-D grid, rotating left/right, accelerating forward, and centering asteroids to shoot them. Asteroids move of course, and your bullets don't reach them instantly, so there's a bit of anticipation of their path of flight to make sure the bullet hits. Asteroids also make a collision alert when they're on a path to hit you so you know to get out of their way.

With 3 asteroids in the first wave, a cockpit sound, the occasional collision alert warning, and bullets flying around, there's kind of a general background drone. I've tweaked gains where it makes sense, and things don't sound bad when you're alone in the environment or there's only a single target. Sources definitely attenuate, and I have a general understanding of rolloff factors and reference distances, but I don't feel like I have a good sense for what's going on even with good headphones. I know there's no right answer, and I've been experimenting with values all afternoon. I'm interested in general advice on how to make OpenAL work well in busy audio environments, but here are a few questions:

1. I think I want the player to be very aware of things within a range of, say, 50-100 units. If a target is 20-30 units away, the player had probably better be killing it or getting out of its way. Beyond that, though, I just want the player to know that something is present and available to be chased down. Are there any distance models particularly good at this sort of looming effect? I suspect I shouldn't bother with the linear model. Inverse clamped seems to be the default, but is the exponential model any better?

2. Should I even be considering a distance model for this? I'm also contemplating highlighting only the closest target, but that could both get complicated and produce false positives. The player might be chasing down a target only to be sideswiped by a fast-moving asteroid, and I wouldn't have provided them with that information since the target that hit them wasn't the close one they were chasing.

Thanks for any tips.

2019-04-02 02:49:01

Conveying relevant meaning with audio is generally a tricky thing, as overlapping sounds tend to bleed together and get confusing. Part of the answer could be selective or situational occlusion to reduce the number of sounds in relevant situations or to create a suitable flow. For example, dimming and muting the cockpit sound when firing the main gun so the player can more easily hear the sounds and tragectory of the bullets, or applying filters or effects to asteroids to better determine their size or velocity, etc. Perhaps you could repurpose the cockpit sounds into something more utilitarian? Like a more natural way to detect if an asteroid is getting close? That could make a very interesting trade off gameplay mechanic, if you fire alot you might not hear the asteroids heading your way, or where they are.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2019-04-02 18:12:35

Thanks, I made some decent progress on this yesterday. I think my biggest issue was that I was using too many of OpenAL's knobs without really knowing what they did, and also that I was working with each sound in isolation. So in some places I used reference distances to fade out sounds, in others I used the rolloff factor, and while everything sounded OK in isolation, it was a mess when mixed.

I standardized on using the reference distance to indicate the size of the sound (I.e. asteroids with a radius of 30 have a reference distance of 30 so their gain is distributed more evenly from the center.) I also implemented master defaults so I can assign everything a default rolloff/reference distance, then tweak individual properties as needed. The result, while not great, is a bit more uniform and predictable.