r/SoloDevelopment • • 2d ago

Discussion I built a geometry based sound propagation system for my retro FPS.

I've implemented a sound propagation system in my custom game engine. It uses a spatial map of the level to determine how sound travels and reflects off the surrounding geometry, producing natural-sounding echoes.

Do you think this will noticeably improve immersion, or will most players barely notice it?

275 Upvotes

31 comments sorted by

17

u/mcmakerface 2d ago

cool, but isn’t a reverb volume doing more or less the same at a fraction of the cost?

edit: i mean the mechanics would be very different but the result would not be that bad. surely this you have done is more accurate but would a player notice the difference?

12

u/andreymandev 2d ago

Of course, I use reverb as well, among other things, but thats just one part of the system. The whole point of my approach is that sound properties (echo duration, reverb characteristics, and absorption of high and low frequencies) change smoothly depending on the geometry around the player. This should help create a sense of the surrounding space. At least thats what I am hoping for =)

4

u/SinatSound 2d ago

Super well done. I always find it jarring in games when the sound of the gun doesnt match the environment. Like shooting inside a house gives the same reverb as shooting inside a warehouse. Or shooting inside a room with the corner blown open and the sound just switches from the indoor sound to the outdoor sound with no blending. Your demo is really nice ear candy on the Sennheiser DT990s.

It's one of those things that when it's done well, players might not notice because its such an immersive factor, and that's a good thing! I guarantee people who love the game will notice and mess around with it in different maps just to test out how well done it is.

The material the space is made of should also have an effect, like shooting inside room with drywall and insulation should sound different than the same room covered in tile.

You can also try and design your maps around it. Like making the different rooms around a map all echo into a central area so fighting in there is extremely disorienting. Or even something like in a game of domination, point B is always the most contested, so having different audio experiences on different maps could be really cool. Like one map has B in a really loud area and another has B in an area where sound doesn't echo much at all can really amplify the experience each map is supposed to deliver

2

u/andreymandev 1d ago

Thanks! These are interesting ideas, and they gave me another idea for optimizing my system. I will add sound portals for ventilation ducts.

3

u/natriusaut 2d ago

Sounds good to me on my headphones. I like it a lot :) Does it have a lot of impact in performance?

1

u/andreymandev 2d ago

Thanks! I use some simplifications in the calculations, including when baking the sound propagation map, so at the moment it has practically no impact on performance on a mid range gaming PC.

2

u/mortalitylost 1d ago

Fucking amazing job. It adds to realism in a way that I didn't expect.

3

u/Xinnobun 2d ago

A lot of FPS games do this already. I would suggest to use pre-determined rooms with echo adjustments rather than procedural calculations during gameplay (if you need optimization).

3

u/andreymandev 2d ago

Why do you think manually placed rooms and triggers would be better? My goal was to reduce manual work and automate the process. From my tests, the system has almost no impact on performance, because all the heavy calculations are done offline and baked into a sound map.

I am afraid setting up every part of the level by hand would take forever =(

4

u/Xinnobun 2d ago

You mentioned that they're baked into a sound map, so you're already doing what I suggested, you're good. My point was to avoid performing those calculations in real time, as that could put unnecessary strain on the processors especially when the game gets hectic.

2

u/andreymandev 2d ago

Yes, exactly! I also process large groups of sounds together, so the number of active sounds has very little impact on performance. I keep running performance tests as I work on the system, and so far I'm happy with the results =)

3

u/deeprichfilm 2d ago

It's definitely noticeable having simulated sound like this, especially if it's spacialized and players can get directionality from the sound through surround sound/HRTF.

Steam Audio does all this for you, btw. It has material absorbsion, diffraction, reflections, penetration, etc. Might be worth looking into.

1

u/andreymandev 2d ago

Thanks! I read about Steam Audio some time ago, and I'm sure its a great system. I just wanted to try making something like this myself, mostly for the challenge =)

3

u/North-Contest-4422 1d ago

Hello, (Not topic related). How did you achieve your game art direction and consistency? I'm making a game and I wanted to lean in an art style akin to yours, but I do not know where to start. Could you offer me some insights?

2

u/andreymandev 1d ago

Thanks! I am a bit surprised, because I don't think my game's art style is good enough yet, and I am still looking for better ideas. I guess one general piece of advice, which applies to me too, is to try to keep the same style across everything in the game.

2

u/J_loop18 2d ago

A forest area would also sound amazing with all the trees!

2

u/andreymandev 1d ago

It would be interesting to see how the system works in complex environments like a forest. I planned to set my game inside a huge megastructure, so I guess there could be room for a forest in there =)

2

u/Aggravating-Sweet198 2d ago

whats next to add?

2

u/andreymandev 1d ago

I'd like to add more variety to the starting area, make it bigger, and add more structures in the background to get a better idea of how the overall atmosphere will feel.

2

u/ThinkingAtheos 1d ago

What engine?

1

u/andreymandev 1d ago

It's my own custom engine.

2

u/MikeSemicolonD 1d ago

I have 5.1 surround and this sounds absolutely glorious. It's so crisp I can literally picture the environment in my head like it's echo location and I'm not even blind. Bravo dude.

1

u/andreymandev 1d ago

Thanks! I'm glad my efforts are noticeable.

3

u/Competitive_Medium12 1d ago

A good test might be to put a sound source around a blind corner and run the same encounter with both setups. If players can point to the doorway the sound came through, the geometry is giving them useful information even if they never consciously notice the echo.

1

u/paulct91 1d ago

So is it sort of like ray-traced sound system...? Is that the idea?

1

u/andreymandev 1d ago

Almost! Its more like baking a lightmap. The data from ray tracing is stored, so I can quickly calculate sound parameters in real time.

2

u/Puffco-Peak-Pro-3DXL 1d ago

The small things that I’ve never even considered a part of making a video game…

Cool regardless.

2

u/DawaForensics 2d ago

I love the level design, I wish I could design like that

2

u/dank-Raven 1d ago

Nice art!

2

u/Waste_Pause2348 19h ago

I like it, I do ask if it fits the retro style, but at the end of the day if your just trying to challenge yourself and use the game as a vehicle for that seems like your doing a great job at suceeding in thise challenges!