Advertisement Jump to content
Sign in to follow this  
greenpig83

Manage user avatar...

This topic is 1783 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

 

http://social.msdn.microsoft.com/Forums/en-US/07e44457-75c2-432e-9a8c-d6e550003eba/background-texture-loading?forum=gametechnologiesdirectx101

 

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 ?

THanks

Edited by greenpig83

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!