This forum is currently in read-only mode.
From the Asset Store
Everything is made via physics, Very simple code: 6 events only (3 for tank creation, 2 for controls and 1 for camera)
  • Hi there!


    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?



  • This is cool. Now add some evil monsters so I can shoot them?

  • Nice tyre treads, but it sure can shoot fast for a tank

  • 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);

  • 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

    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.

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

    Set Frequency changes the pitch, as does enabling Doppler effects.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

  • 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...

  • If I recall, there was a huge deal with Creative forcing Microsoft into some controversial moves. Didn't they have to abandon Vista's Directsound Hardware Abstraction Layer? Being the bullies they are, I wouldn't be surprised if Creative had a hand in gimping that part of the OS to sell some more decade-old hardware to PC manufacturers.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)