Reduce sound files?

0 favourites
  • 10 posts
From the Asset Store
Source code, art assets and music tracks to remake this game
  • Hi all,

    I want to upload my HTML game to a website, but the ZIP file contains too many files. Only 500 files are accepted, I have about 880, most of them are sound files.

    Those are present twice: Once as .m4a, once as .ogg. I think this is done as not all browsers support all formats, but I need to reduce the amount of files. Would it be possible to delete all the files of one format without interfering with the game? Which audio format is covered by more browsers?

    Thanks in advance!

    Edit: Unfortunately, deleting files out of the ZIP folder disables my game to load. Is there any way to work around this?

  • I believe the default audio format in C3 now is webm. If you re-import all sounds from wav, they will be converted to webm.

    See this article:

    construct.net/en/blogs/construct-official-blog-1/opus-audio-construct-891

  • Remove the sound files from your project, before export. This way, they are not required by the project, and the game can then load.

    Or find a host (distant website) that does not limit the number of files you can upload in your archive.

  • Thanks for the quick response.

    My project has been converted from C2 to C3, the old sound files were unfortunately not converted to WebM.

    Kyatric Is there any chance that C3 might get a feature to convert those files automatically? Manually re-importing the sound files is just not possible, as there are hundreds of them that play at specific times in the game.

    I could delete one of the formats as you mentioned, but I'm worried about browser incompatibility.

  • Automatically converting the files is potentially destructive, and not necessarily what the user wants. For best results you should always import your audio from a high quality source, not re-encode an already compressed file. Also in most cases m4a and ogg is still a valid choice for providing audio support. We still allow users to import m4a files for audio as an alternative to webm(opus).

    It should be relatively easy to convert these files into webm if you so wish. Audio is played by name, ignoring type, so swapping file types shouldn't effect your event sheets. Importing audio can be done in batches, so you can import as many files as you want in one go. If you don't have the source audio anymore then you can extract your audio files from the project by downloading a copy of the project, unzipping the C3P file, and then just copying the files from the "sounds" and "music" folders.

  • Didn't know event sheets were unaffected. Well designed!

    Worked perfectly, thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Glad I could help. Yeah there's some magic with audio files specifically for being able to have multiple formats, it's quite handy.

  • Hey Nepeo, you stated:

    It should be relatively easy to convert these files into webm if you so wish. Audio is played by name, ignoring type, so swapping file types shouldn't effect your event sheets.

    That isn't fully true.... right? There's 2 events for playing an audio file, Audio: Play and Audio: Play (by name). Your statement is only true if you use play by name. If you delete your audio files and you used Audio: Play all of the events referencing that audio file will be deleted also. I just tested it in r172. Which is the reason why I only ever use play by name.

  • Fib It's true, and by design. Sound files are grouped by name, not by extension. If you import sfx.wav and sfx.m4a they will appear as 1 file "sfx", with 2 subfiles for the types "webm" and "m4a".

    Adding a play action selects an audio file, not a subfile. Which means you can add and remove subfiles for that audio file without issue. If you remove the file, or the last subfile, then it will remove the related events.

  • Ohhh I see what you meant now. I just misunderstood. Thanks Nepeo.

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