Jump to content

Ambient Soundscapes


Recommended Posts

 

 

So, it would be nice in Atlas/biomes/random maps to be able to choose a different ambient sound for a map. The current "birds chirping in a North American forest" sound is pretty played out. How difficult would it be to code something like that? Just a drop list in Atlas and then some lines in the biome and random map code.

While playtesting the new NAVAL OVERHAUL (PLEASE REVIEW!), I play something like the video in the background to give me that ocean ambient.

 

^Great for island maps

  • Like 1
Link to comment
Share on other sites

9 hours ago, Stan` said:

Currently hardcoded in one js file called ambient.js or something. Maybe it could read the biome data or something.

/**
 * This class is concerned with playing an ambient track, birds chirping etc.
 */
class Ambient
{
	constructor()
	{
		Engine.PlayAmbientSound(pickRandom(this.Tracks), true);
	}
}

/**
 * TODO: Let the map decide the tracks.
 */
Ambient.prototype.Tracks = [
	"audio/ambient/dayscape/day_tropical_10.ogg",
	"audio/ambient/dayscape/day_tropical_11.ogg"
];

 

I altered the tracks in the list at the bottom and it works. Yeah, unfortunately there's still no way to change it on a per map basis. Definitely a desire. Either the ambient tracks could be listed in the biome file or this ambient.js file could allow you to do it. 

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Question to the devs: would be technically possible to integrate additional ambient sounds to the game also based on different contexts? 

Thinking like some background sounds of a bustling city while we hover to the main base, or some battle background during fights.. that would be pretty cool to further enhance game immersion! 

Would it work with auras, or requires some biome-related triggers? 

 

Definitely not a feature "high" on priority list at the moment, but would be probably a nice added touch for future releases :)

 

  • Like 1
Link to comment
Share on other sites

On 02/01/2024 at 3:38 AM, wowgetoffyourcellphone said:

I altered the tracks in the list at the bottom and it works. Yeah, unfortunately there's still no way to change it on a per map basis. Definitely a desire. Either the ambient tracks could be listed in the biome file or this ambient.js file could allow you to do it. 

You could probably do it via triggerscripts, you can then control which maps you want what soundtrack on very specifically.

Link to comment
Share on other sites

25 minutes ago, Grapjas said:

You could probably do it via triggerscripts, you can then control which maps you want what soundtrack on very specifically.

You can probably get away with the same trick I used for the biome buildings

https://gitea.wildfiregames.com/0ad/0ad/pulls/7069/files#diff-81474b3184d8557e342374db4f58e99a876da08a

Using the biome you can put in the map you could switch the tracks.

Actual patch https://code.wildfiregames.com/D2401

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...