Hi,
Is it necessary or better to pre-load image and audio resources at start of app run?
Let me know, thanks!
JeZxLee
Hi,
Is it necessary or better to pre-load image and audio resources at start of app run?
Let me know, thanks!
JeZxLee
Hi @JeZxLee,
Normally it’s not necessary to pre-load these, unless they’re absolutely enormous in (file) size and you notice, in testing, that the app skips/stutters when you load them. It might be useful to pre-load some sound effects when a level begins/loads, versus loading them on-the-fly as the level goes along, but even then, most sound effects load pretty quick (again, though, audio file size matters and you should do some testing on base devices). As for larger audio music tracks, those can of course be “streamed” instead of pre-loaded, which shouldn’t reveal any kind of frame rate stutter at all.
Take care,
Brent
Hi @JeZxLee,
Normally it’s not necessary to pre-load these, unless they’re absolutely enormous in (file) size and you notice, in testing, that the app skips/stutters when you load them. It might be useful to pre-load some sound effects when a level begins/loads, versus loading them on-the-fly as the level goes along, but even then, most sound effects load pretty quick (again, though, audio file size matters and you should do some testing on base devices). As for larger audio music tracks, those can of course be “streamed” instead of pre-loaded, which shouldn’t reveal any kind of frame rate stutter at all.
Take care,
Brent
Hi,
I had a similar question. Does anyone have any guidelines on best practices for audio file size? What is a large audio file? I generally try to use files under 1 MB (most are 100 - 200k) and no more than 6-8 files in any given scene. As I said, I don’t have the slightest idea what size range I should be looking for.
I would prefer not to preload most files, since it seems inefficient to preload several files when, depending on what is interacted with in a scene, only a couple (or none) may end up being used. I tend to load the audio alongside an animation.
Thanks,
Steve
Hi Steve,
With so many devices out there of so many varying CPU capabilities, it’s still tough to guage what a “large audio file” is versus one that’s not so. Remember that with audio, if you’re using sound effects throughout a certain scene, you should almost always pre-load them before the real action starts anyway.
Then, for larger audio files like background music tracks, those should be streamed in almost every case, not pre-loaded in their entirety.
If your design is really “dynamic” in terms of what audio files are needed, I suggest keeping them as small as possible while retaining an acceptable level of clarity… again, I know that’s still not a specific guideline, but the smaller you can make them while keeping the quality at an acceptable level, you’ll always benefit in some way or another (load time, impact on app bundle size, or whatever).
Brent
Hi,
I had a similar question. Does anyone have any guidelines on best practices for audio file size? What is a large audio file? I generally try to use files under 1 MB (most are 100 - 200k) and no more than 6-8 files in any given scene. As I said, I don’t have the slightest idea what size range I should be looking for.
I would prefer not to preload most files, since it seems inefficient to preload several files when, depending on what is interacted with in a scene, only a couple (or none) may end up being used. I tend to load the audio alongside an animation.
Thanks,
Steve
Hi Steve,
With so many devices out there of so many varying CPU capabilities, it’s still tough to guage what a “large audio file” is versus one that’s not so. Remember that with audio, if you’re using sound effects throughout a certain scene, you should almost always pre-load them before the real action starts anyway.
Then, for larger audio files like background music tracks, those should be streamed in almost every case, not pre-loaded in their entirety.
If your design is really “dynamic” in terms of what audio files are needed, I suggest keeping them as small as possible while retaining an acceptable level of clarity… again, I know that’s still not a specific guideline, but the smaller you can make them while keeping the quality at an acceptable level, you’ll always benefit in some way or another (load time, impact on app bundle size, or whatever).
Brent