How does iOS load/cache game assets on startup?

So I’m reaching the point where I’m designing game levels and graphics. And I’m curious, how does iOS (or AndroidOS) know what and how much of your game to load on startup? If I have 10 levels, with a considerable amount of graphical or audio assets, the device can’t possibly try to load ALL of these when the app starts up, correct?

I mean, a game you download from the App Store might be 35 MB in overall size… the device can’t be loading all 35 MB of assets before bringing up the menu screen. So how much does it load, and when? Does it basically process the core “main.lua” and related modules, then load graphical assets as the programmer demands them? This is logically how I would expect it to work.

I understand how to load assets as-needed, and clean them up properly afterward. I also know how to use Corona’s dynamic scaling features to utilize lower-quality images for older devices and better images for newer devices. I’m just not fully aware how the device understands when to load these assets and how many of them to ensure a smooth end-user experience.

Thanks in advance for any explanation!

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 9546 reply_id: 309546[/import]