How long was the shortest sample you've used in a game?

Discussion in 'Indie Related Chat' started by oNyx, May 24, 2010.

  1. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,211
    Likes Received:
    0
    I'd like to gather some rule of thumb statistics for pushing better WebM/Vorbis support in modern browsers.

    Currently Firefox fails at playing:

    0:00.783 (34510 samples)

    Opera fails at playing:

    0:00.099 (4381 samples)

    And Chromium completely fails for some reason. Even if the file is several minutes long. It appears that it currently cannot deal with WebM files which don't have a video stream.

    Now, this second 99msec long sound effect is indeed very short, but it's a sample I'd like to use in a game and I really don't feel like padding it with silence.

    So, how long (in msec) is the shortest sample you've ever used?
     
  2. PoV

    PoV
    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    2,132
    Likes Received:
    0
    Are you suggesting short sfx are bad, or something else?
     
  3. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,211
    Likes Received:
    0
    There is no hidden agenda. I merely want to show that really short samples are actually used and that the ability to play really short samples is indeed a critical feature.
     
  4. PoV

    PoV
    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    2,132
    Likes Received:
    0
    Oh okay, so there's a bug.

    Isn't that a bit of a waste though? Having to (constantly?) OGG decode a file less than a second, or is WAV playing not possible?
     
  5. Dingo Games

    Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    143
    Likes Received:
    0
    I use short sounds in my games quite often. The shortest would be about 80ms... I think it's pretty common in games. That said, I just dropped a really short ogg vorbis sound into Firefox and it played with no problem.
     
  6. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,211
    Likes Received:
    0
    Browser vendors can optimize this if they want and most likely they already do this. Images for example also aren't decoded again and again if the same image is used multiple times.

    WAV is way too bloaty. It's about 10 times bigger than Vorbis (no matter which container you use).

    E.g. I got here 17 short samples. Together they are 1.39mb in size. The Ogg/Vorbis files are 139kb (1/10 indeed) in size. 1.39mb is already way larger than the size I'm aiming for.

    Yes, it works with Ogg/Vorbis. The point is that the same doesn't work with WebM/Vorbis.
     
  7. PoV

    PoV
    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    2,132
    Likes Received:
    0
    Except for ordinary web work, a sound is never used more than once. Heck, most ordinary webs never use sound at all, making it a low priority (even though there's all that HTML5 vs. Flash thing going on).

    I'm guessing the practical uses you're implying are HTML5 game development, heh, otherwise I'm missing the point. ;)
     
  8. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,211
    Likes Received:
    0
    I do not care if they cache it. Playing 10 Vorbis streams at the same time takes what? 2% CPU? There are far bigger problems than that.

    I do, however, care if the sound is actually played. There is no image too small to render. Why should it be any different with audio files?
     
  9. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,791
    Likes Received:
    0
    In download games I sometimes use very short samples. In a recent Flash (AS3) game that I helped make I discovered that some short samples were in fact getting truncated, it was weird and annoying so I had to include whitespace on the end of them for them to play fully and be heard.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer