ID:160435
 
Ok this might go in design philosophy so sorry if it does but this seemed more appropiate.
Im making a party system kinda similar to WoWs where you can have 5 people in your party and their name and health will be displayed on your screen. The question I have is what would be the most efficient way to update those as to cause the least amount of lag.
Should I create a proc that runs continously once they are in a team that loops through every 10 seconds or so and updates or create a proc that will update the screen when a player loses health in the team.

Also how should i display the health, should i do text like (50/100) or do a health bar where i would just change the icon state to match there relative health. Again Im looking for the most efficient method. Im thinking that the health bar will be more efficient cause i wont have to delete and readd stuff to the screen and just change the icon state.
Most efficient would be calling a function to update the display whenever the value is changed, instead of periodically (in much the same way you call something like DeathCheck() right after someone's HP is changed). That way it won't end up cycling all the time even when the values haven't changed and therefore an update is unneeded. It will also update as immediately as possible, unlike doing it periodically (unless you're calling the function periodically like every single tick, but that's really bad).

As for things like, "health bar or display the health number", choosing between such things should be more according to which style you prefer instead of which ultimately executes faster, then you find out the most efficient way to implement the one you want. There are even more options, and you might opt not to display it on the map at all, but at some interface control etc.
In response to Kaioken
Well I like either method and doesnt matter to me, I would make both look good its just a matter or which would cause less lag to me, cause Im having a lot of different screen updates and procs in my game so Im trying to make them efficient. As for the interface setup that is out of the question for my game cause it doesnt have panels on it. The entire screen is the map with a chat box overtop of it in the corner, so if I want them to be able to see it all the time it needs to be put on the clients screen.