ID:153398
 
Well, I've finally gotten back to working on my RPG; I'm hoping to push some limits, but I'm bound to run into problems and now I have a question on HUD backgrounds.

For reasons that shall remain unknown (but could easily be figured out by looking at some in-game screenshots), I wish to place a .png HUD background behind the world. The .png is as large as the screen (544x448) and it's tiled using the following code.

var/ex=1
var/yi=1
while(ex<=17)
while(yi<=14)
new /HUD/background(client,ex,yi) //assume that New() adds it to client.screen correctly
yi++
yi=1
ex++

The code is working, but whenever the screen moves, the player and screen both move slowly (it works fine when the background is dissabled. My question is, is this "lag" unavoidable when using large backgrounds like this, or am I doing something wrong; is there a better way of achieving the same effect?
The specter of "HUD lag" has proven to be elusive and hard to pin down. My theory is that having a lot of moving graphics is simply processor-intensive in general, whether they're on the HUD or not, although there are likely to be other factors involved. What are the specs on your computer?

It's worth noting as well that having a 17x14 view area is going to cause some appreciable network lag in and of itself, unless all players are stationary; the larger your view area, the more data the server has to transmit every time someone moves. This is a seperate issue from the processor lag of having to draw that many objects, however.
In response to Leftley
Leftley wrote:
The specter of "HUD lag" has proven to be elusive and hard to pin down.

Lummox JR and I tracked down the source of the HUD lag. He did clean it up some for 338, but further refinement will require an overhaul of the HUD drawing routines. It's in the works, but the development team is focusing on more critical issues for the time being.