Object to hold client side avatars that accept updates from server.
Is it better to use a key map so the data(from server/queue) can find avatar by key, then update, or something like arraylist and do lots of loops through looking for next guy on update list?
How about both? Use one when you want to cycle through to display them all and another when you want to find updates… wrap the two containers up in an outer shell class and call it AvatarCollection or something (perfect example of why Generic are bad).
Failing that I’d use a Map since getting out keySet().iterator() isn’t too expensive and you probably don’t care about the order in which you process your avatars.
Kev
exactly, order is not important. Just need to find them when their update id comes up next in the data packet from server. May do both and like you said, have the gui render loop make a call to avatarCollection.render(); to paint on screen.
Thanks!
ps: you loaning out 4k games for contest?
Re: 4k
Wait til you see the next one! Its a beaut.
Kev