Hi, I have a common problem like this!
In my game each user have an avatar. It's a small image about 128x128 size. (I use D3DSprite to draw the avatar on screen)
I have hundred of them for user to select, or they can upload their own. I think most system have this like forum...
There are alot of them that load them all at start of game is not nice! So I want to load them only when that avatar appear on screen. And keep about 100 avatar at a time! When a avatar is loaded it will have a loading image instead! The avatar will be free if it is not used ...
If we use each texture for an avatar, it's simple. I'm not tested yet, but i think display many texture at a time will slow down the performance (if we in a lobby screen or ranking screen, there will be ~ 20-50 players on screen). I prefer to load all the small image into 1 big one, that will speed up a lot! Because D3DSprite draw well with less texture!
But as we know, when we change a texture, we need to lock it, and i'm not sure we can still draw it while it's locking. Furthermore, I read at
they adviced not to use thread for loading texture. So that will be problem. I dont want the game to stop just to load all the user avatar. What will you do in this situation ?