Tank

Post your Construct-made creations!

Post » Sat Apr 19, 2008 2:09 pm

Hi there!

[url:92s7gj1r]http://www.drum-world.com/tank.rar[/url:92s7gj1r]

Space bar to shoot machine gun
Click to shoot turret
Arrows to move

It's just a demo of the movement theres nothing else in it tbh, but let me know what you think.
Also there is a bug on my PC, where the clicking turret gun doesn't play the shoot noise when shot. Are both sound effects working for everyone else?

Thanks!

Tom
Image Image
Scirra Founder
B
125
S
37
G
25
Posts: 3,945
Reputation: 44,922

Post » Sat Apr 19, 2008 2:45 pm

This is cool. Now add some evil monsters so I can shoot them? :D
B
2
S
1
G
5
Posts: 79
Reputation: 1,558

Post » Sat Apr 19, 2008 4:02 pm

Nice tyre treads, but it sure can shoot fast for a tank ;)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Apr 19, 2008 9:07 pm

Both sound files play just fine for me.

Hey Ashley, would it be worth your time to add pitch variation to Directsound? Doesn't have to be great.

-Play sound from file with pitch 0.8+(random 0.4);
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Sat Apr 19, 2008 11:22 pm

If you're going to have mouse control for the cannon then I suggest setting the Machine Gun control to the right mouse button. Unless you want to mail me an extra hand :P

Another recommendation, though not as important: if you ever have any mouse/keyboard combo controls in your game it's probably a good idea to map your movement to WASD. It's just more comfortable that way. Unless you're a lefty, I guess.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Apr 20, 2008 12:56 am

[quote:30ncl4r9]Hey Ashley, would it be worth your time to add pitch variation to Directsound?[/quote:30ncl4r9]

Set Frequency changes the pitch, as does enabling Doppler effects.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Apr 20, 2008 2:29 am

Ah, okay. Forgive me, as my work recording for our auditorium crew has me conditioned to think of frequency as the quality of an audio file, not its audible length. But then again, I shouldn't have expected DirectSound to be resampling high level audio on the fly.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Sun Apr 20, 2008 3:06 am

Yeah, I think it works more like changing the playback frequency of the file (the rate at which samples are mixed with the primary buffer), which as a side effect changes pitch. Perhaps this isn't the best way of doing it - setting frequency to 30KHz for example could either increase the pitch (for a 22.050KHz wave) or decrease the pitch (for a 44.1KHz wave). I think your idea would be a more elegant way of doing it, ie. instead of 'set (playback) frequency' action have an 'alter pitch' action which works as a percentage of the original sample rate. So 'Alter pitch' to 50% would always halve the playback frequency, always reducing pitch by an octave for any wave. I think I'll do something along those lines for the next patch.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Apr 20, 2008 3:08 am

Cool, but by no means is your original way wrong. We just had different connotations of the same subject. :) I'm always glad to have new features to play with, though!

EDIT: I guess this brings me back to the topic at hand. For the tank fire sounds, you should pitch shift them slightly from shot to shot to alleviate ear stress and to provide a more natural sound.

EDIT EDIT: Ashley, I thought some more about it. The more elegant solution has another benefit in that if you choose to package your product with reduced-quality sounds, any effects applied to them do not become problematic in the way you foresaw.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Sun Apr 20, 2008 3:23 am

I'm not sure if it's relevant today, but the Directsound SDK warns against using a lot of frequency changes for performance reasons, which is part of the reason why you have to explicitly enable frequency changes on a channel. Just mentioning it so you're aware of that, but since Vista is moving to an entirely software-based audio model, perhaps it's not a significant issue - need to find out more about that...
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 0 guests