ID:152895
 
I've noticed that generating a HUD is, well, slow since there are often so many objects. But is it possible to get this load to be fast? Is there any connection to the cache? I notice how in console games you often get this "Loading..." screen and then it loads stuff - is that so then later the game is fast?
DeathAwaitsU wrote:
I notice how in console games you often get this "Loading..." screen and then it loads stuff - is that so then later the game is fast?

Yeah. In a console loading screen it basically pumps almost everything it's got into two things, animating the loading screen and loading up all the resources.
Otherwise you'd get highups when a bunch of different types of objects come into view.

One thing you've probably thought of is using a global set of objects for the HUD. Ie, in a classic HUD you'd have a say button. Since there's nothing user specific about it, you'd just have a global var with that object stored in it that you add to everyone's client.screen.
var/global/obj/sayButton/sayButton

world/New()
. = ..()
spawn(1)
global.sayButton = new /obj/sayButton ()

mob/Login()
. = ..()
src.client.screen += global.sayButton


That's not the cleanest snippet, but it shows what I mean.