Tip: Cut your loading times by more than half

JamesZeppelinJamesZeppelin Member Posts: 1,927
edited November -1 in Working with GS (Mac)
SO my game "protect your Nuts" came in at about 10.8mb and the level load times were insane after i added speech (main character has about 15 random sayings when you press fire)

*a large part of GS loading is preloading and converting the ogg files for gameplay so cutting these down is huge for that awful load screen

Plenty Vets already know this but here is what i found.

I had made my music and recorded my audio in garage band which natively records and saves in stereo. Since Game Salad converts to ogg and m4a i just drag them in and dont think about it.

A stereo file for those who dont know is really just two mono files.

1. SO first dragged my files into Audacity
2. used the option "convert stereo clip to mono"
3. While i was at it I quickly clipped off a few milliseconds of silent audio at the end of the clips
4. exported as as Ogg with sound Quality of 2 - Be sure to use the same name (after extensive testing quality 2 is fine for games)
5. Dragged them into GS (since they had the same name they replaced the originals making any changes unnecessary.

THE RESULT
my 10.8 MB game is now 6.3

AND.... my load times are cut down by around 80%

Comments

  • VmlwebVmlweb Member Posts: 427
    The result in this will mean mono sound.
    One of my zombie games is very dependant on the stereo to create atmosphere with the music I made for it.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Yeah I hear you there

    I knew my sound effects could be mono but I tossed it back and fourth about the music and finally decided that people giving me 1 star before govmg the load a chance outweighed the few who use headphones.

    I think most gamers either just use iPhone to quickly kill time or makeup their mind about a game before they would ever put on headphones

    maybe the solution is mono music in the lite version to make the sale and then stereo for the full

    Either way personally I'm sticking to mono just for the load times bit it is certainly a matter of preferance
  • VmlwebVmlweb Member Posts: 427
    I usually play properly with headphones in bed until I fall asleep.
    You guys should try it, it's a great way to kill all that time just laying in bed awake.
  • BeyondtheTechBeyondtheTech Member Posts: 809
    Alas, I'm at work again and can't test anything.

    Does it preload ALL sound files, or just what's on the first scene?

    If that's the case - or has anyone tried - to make their Initial Scene basically nothing, so that the GameSalad engine wouldn't have much to load on the start, then load everything as you move further into the game?

    I'd rather have the user wait while they're inside the game, instead of starting at the GS splash screen, wondering if the application is going to load.
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Huh I hadn't thought of that Beyond. Interesting idea. Mebbe I'll experiment with two versions and see which feels best when I'm closer to being done.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    IM not sure but i know it cut the first scene down some and and the levels down alot.

    It was a huge differance.

    I mean we are talking the diff of 4mb of audio.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    @ Mike Quinn - Sidenote

    I just checked out your website...

    Very Cool career you've had / have

    Some pretty big movies you've worked on... Although i wasn't quite sure what that star wars project was. Was that released in the states?
  • SparkyidrSparkyidr Member Posts: 2,033
    on one of my games, the first scene is just a logo...then scene 2 is a title screen with music, and scene 3 is my play area.

    It still takes ages to load (as normal), but loading directly to a scene with a load of oggs is deffo much slower on that initial gs load yeah.
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Heh, thanks TinyMonster.
    Perhaps you are referring to Return of the Jedi (puppeteer) & Attack of the Clones (Animator).
    My web site is horribly out of date overall and needs to be blown up!
    I'll soon move the fun stuff over to QuinnZone Studios web site and do a better job focusing on productions, like my GameSalad games for example..... whenever I get the first one finished ha! ;)
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Bad joke that didn't come across correctly
    I just meant "star wars, whats that?"
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    HA HA!!! I get it now - sorry slow on my part!
  • quantumsheepquantumsheep Member Posts: 8,188
    I checked your site out Mike, and didn't want to say anything.

    Mainly because I want to marry you now and that might scare you.

    Hello?

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • CobraCobra Member Posts: 160
    As TinyMonster says, reducing the quality and/or number of channels in your audio files will help with both filesize and load time.

    In situations where you want high-quality audio, there's another option: the Apple CAF format. GameSalad will accept .caf files without converting them to .ogg.

    With CAF you have a choice of codecs. At the extreme end, uncompressed Linear PCM (16-bit little-endian) gives you CD-quality sound reproduction and will load lightning-fast, but will also increase filesize.

    Max is a good, free utility that can do batch conversion between sound formats.

    EDIT: Please, continue. :) *popcorn*
  • scorelessmusicscorelessmusic Member Posts: 565
    Thanks for the tip, Cobra. I will put my vote in for .caf files as that is what I rely on for CHORDiCA for the lowest possible latency.
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Lol @ Quantumsheep!
    At least buy me dinner first.
  • JGary321JGary321 Member Posts: 1,246
    So what would be the pros vs cons of using ogg vs caf? Caf is just bigger file size? But does it take as much resources? Anyone know?
  • adadoadado Member Posts: 219
    @Cobra: Any other nifty undocumented features such as this that might be shareable on the Wiki????
  • CobraCobra Member Posts: 160
    @adado,
    Not to my knowledge. :)

    @JGary321,
    Sounds are uncompressed before being loaded into memory, and basically the process takes longer for heavily-compressed formats like .ogg. CAF gives you options for lighter compression (or none at all with straight Linear PCM), resulting in larger filesize but faster load times.

    Once your game starts there shouldn't be a difference in resource use.
  • JGary321JGary321 Member Posts: 1,246
    Thanks for the explanation Cobra.
  • scorelessmusicscorelessmusic Member Posts: 565
    I'm going to stick with CAF so that I don't get any surprises with the 'memory and resource tax' for my audio. Already Apple rejected my binary twice due to the heavy load imposed by Mozart To Infinity. :-/
  • UtopianGamesUtopianGames Member Posts: 5,692
    I recently tested my 3.5 mb game Busy Bee on friends and it only has a main music and one sfx both ogg.

    It also only has 4 scenes with 12 actors max.

    Biggest complaint?

    Loading times.......it wouldnt be so bad if it had long loading times once but every time you restart is a bit too much imo.

    Darren.
  • scorelessmusicscorelessmusic Member Posts: 565
    I'm pleased to report hope and good news for all! :)

    With Mozart To Infinity, I'm pushing 96 - 272 audio files in a single scene. With .ogg, I managed to get it to work only on the 3GS. Even the 3G crashed out.

    Thanks to the insider tip from Cobra, I switched over to .caf without changing the code and I confirm that it now works not only with the 3G but all the way down to the 1st gen iPod Touch! How's that for great optimization? :)

    For those that are interested, I used the command-line 'afconvert' to convert all my 272 audio files to .caf (stereo => mono, aac data). It would have been too tedious to use Audacity and even Max has some conversion limitations.
Sign In or Register to comment.