Sound Game - no graphic ( Volume Control )

Get help using Construct 2

Post » Wed Apr 04, 2012 4:44 pm

Hi
At start, sorry for my english.

In past i make a lot of games in click & play app but Construct 2 is new to me and i wanna make serious game.

In game i wanna make top view map with character exploring room, but player will dont see nothing. He will be only hear a sounds around.

It's any way to make sound more spacious? And how i can controll volume of sound.

In short: Player is in front of fan, he hear fan in a front of him and when he go in direction of fan noise just volume up, becouse he is closer.

Plz help.piec2012-04-04 17:15:09
B
9
G
2
Posts: 17
Reputation: 1,444

Post » Wed Apr 04, 2012 5:10 pm

A capx to show how to use sound volume in C2
As mentioned in the help line of the "Set volume" action, 0 db is the max volume before your speakers will saturate, -10 db represents 50% of the max volume.

The problem is audio support in browser is not much at the moment, so you can only use what's implemented in the audio object. (No panning, playrate control works in chrome, not in FF, etc...)

I don't know how far you can take your idea but it is a good one, keep it up.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Wed Apr 04, 2012 5:17 pm

[QUOTE=Kyatric](No panning, playrate control works in chrome, not in FF, etc...)
[/QUOTE]

It's not good to hear it, but anyway i will try to make it playable. I think only volume control can be enough to make it good to play.

Thank for example!
B
9
G
2
Posts: 17
Reputation: 1,444

Post » Wed Apr 04, 2012 5:19 pm

I do have a solution that works quite well, I've tested it with some blocks:

it uses distance comparison. make a trigger event to start playing your music/sound then control it in relation to the distance between the object and your character by implementing something like this:
where 'Cerberus' is your 'Fan'


hope it helps and nice idea :)
B
16
S
3
G
4
Posts: 40
Reputation: 3,877

Post » Wed Apr 04, 2012 5:55 pm

[QUOTE=KiyowaraKush] I do have a solution that works quite well[/QUOTE]

Wow, thanks a lot!
Great example of that what i wanna do.

And i must say, it's not my idea. I read about game like that, but creators do a kickstarter to get money on recording sound (don't remember title). I just have my own vision of game like that and i wanna to make one :)

Its can be fun (survival + adventure game style)
B
9
G
2
Posts: 17
Reputation: 1,444

Post » Thu Apr 05, 2012 9:10 am

Can You tell me how set it like on the picture?
System > Compere two values?

I can't find it on forum.

B
9
G
2
Posts: 17
Reputation: 1,444

Post » Thu Apr 05, 2012 9:15 am

Yeh it's System > Compare two values.
in the 'First value' section put distance(Object1.X, Object1.Y, Object2.X, Object2.Y) replacing the object names with your actual objects
then in the second value section put in the pixel size you want
B
16
S
3
G
4
Posts: 40
Reputation: 3,877

Post » Thu Apr 05, 2012 6:28 pm

Thanks :)

Everything work great!
But is any way to dont make that behaviors for every object? Is any way to make group of sprites and make behaviors for every object in that group?

I just wanna make 10 objects with sound, and dont wanna make so many behaviors for each of them.piec2012-04-05 18:28:45
B
9
G
2
Posts: 17
Reputation: 1,444

Post » Thu Apr 11, 2013 5:38 pm

Hello.

I found the other way. You don't need to make a tons of events. Just:

System every tick -> Set volume(-distance(player.X, Player.Y, Sound.X, Sound.Y)/10 dB)

Maybe u will want to change number "10" to some another. For me it was optimal.

Sorry for my engl... R0ller2013-04-11 17:39:53
B
4
Posts: 13
Reputation: 376

Post » Fri May 31, 2013 7:48 pm

Hey guys, i dont want to spam so i ask in this thread.

How can i put this formula in my event sheet: System every tick -> Set volume(-distance(player.X, Player.Y, Sound.X, Sound.Y)/10 dB) i dont get it...

Thanks.
B
12
S
2
G
1
Posts: 69
Reputation: 1,142

Next

Return to How do I....?

Who is online

Users browsing this forum: Zebbi and 28 guests