So I've been toying with this idea for some time now, but my limited experience with multithreading is making me wonder how plausible my ideas really are~
I'm aware that the ContentManager, as it is, is not thread-safe. I've also already gone thru and gotten working a multi-threaded loading screen with a basic animation playing while the content loads in the background (this, thanks to other posts here!)
What I've been thinking about tho, is making my game virtually load screen free~ That is, streaming in content as needed. The issue obviously, is trying to call ContentManager.Load in a background thread, while my world object is querying about whether certain assets are loaded, and if so, calling ContentManager.Load to retrieve them, in the main thread.
So, there's 2 things I want to do:
1) Add query functionality to the ContentManager to check if an asset is loaded already or not, without actually -requesting- it to load.
2) Add proper locks and whatnot to allow one thread to access already loaded content while another thread is loading content.
The first should be negligible at worst, to do, but the second is the one that I'm really not up-to-par with me multi-thread-coding enough to be sure about the plausibility of. Would this be possible? Perhaps by means of some sort of invoking of the main thread to add an asset to it's loadedAssets Dictionary once the loading is actually complete?
Of course, there may be other objects that need to be worried about as well as far as loading content goes- I'm not overly familiar with the inner-workings of how XNA loads content.