ID:152587
 
Is it true that creating custom mouse pointers can cause extra lag? If so can anyone tell me why? To me personally, it doesn't seem it would, but maybe for some reason there is. So is custom mouse pointers causing lag, myth or fact?


-Doh
I've never heard of that, and it wouldn't make sense for it to happen. So I would say no.

Mind you, I was skeptical about screen objects "causing lag" at first, and it turns out that they do actually take up way too much CPU time on older computers. So it's possible. But I wouldn't call it likely.
In response to Crispy
I had some requests to remove the custom cursor from DBTC due to this... It prompted me to add in a prompt to ask if the player wanted to use them or not...
In response to Crispy
Crispy wrote:
I've never heard of that, and it wouldn't make sense for it to happen. So I would say no.

Mind you, I was skeptical about screen objects "causing lag" at first, and it turns out that they do actually take up way too much CPU time on older computers. So it's possible. But I wouldn't call it likely.

Screen objects cause lag for one major reason: Whenever one of them changes, the entire HUD is considered "dirty" and the server resends the entire thing. Eventually I hope to change this, but it's buried so far in the implementation that it's gone on the back burner. I think originally HUDs were intended to be small affairs, and so when Dan implemented them he just had the server send the whole thing without considering which objects had changed. To properly handle HUD refreshes we'd need a server-to-client message telling the client which objects were added, changed, or deleted.

Lummox JR
In response to Lummox JR
Interesting. I was under the impression that it was just an inefficiency in the drawing code. I tried running one of my games with and without a HUD on an old Pentium II once, and there was a noticeable difference in CPU usage.
In response to Crispy
Crispy wrote:
Interesting. I was under the impression that it was just an inefficiency in the drawing code. I tried running one of my games with and without a HUD on an old Pentium II once, and there was a noticeable difference in CPU usage.

It could be both. For example, screen objects that have mostly or even totally transparent icons can cause lots of lag.