So I'm working on one thing that I can't figure it out at this moment. Lets say that I have my all game data compressed into zip archive. There's a scripting system in the game that lets you to do some stuff. For example spawn npcs, equip specific items, etc.
Where's the problem? When I'm loading my world that is separated into chunks it's quite easy to load needed assets and other data without any notice. But lets say I write a script that triggers an explosion after a button press. In that moment game needs to load explosion textures, etc. Without separate threads, on slower system, the game would definitely freeze for some time. If I would use separate threads after all - on the slower system it may cause missing textures problem or something like that.
So it's quite easy to load up ahead some resources while loading world chunks, but how to foresee what resources should be loaded for objects that will be seen after script execution?
I don't know if it's possible to understand what I want to do, but I can give another example. In Bethesda's games like Fallout 3 or TES you can use spawn command that shows up constructed npc with all the textures right away. Any ideas how they load up textures and models so quick?