Hogne Håskjold wrote:
Richard Kettering wrote:
Yet another bit of evidence, IMO, that we really need a *completely
different* approach to our graphics engine.
Our current system of basing not only our gameplay, but also our
drawing code on hexes really makes us jump through hoops - I'm not
sure how badly, because I really haven't looked at the code yet, but
something really doesn't seem right about hitpoint bars being
clipped by the hex boundaries.
I would think there is a reason for this clipping, maybe efficiency,
maybe to keep the code simple and clean. You should have a chat with
ayin about this, he is currently working on an OpenGL client for
Wesnoth, and also have some rewrites of parts of the terrain drawing
engine pending. He would surely have some input on this I would think.
Yes, it's entirely an efficiency and simplicity thing.
If only hex (x,y) is modified, only hex (x,y) needs to be redrawn. But,
how would we know if an energy bar from an adjacent hex overlaps into
the hex and needs to be redrawn too? That would be rather complicated,
and that's the reason for it.
It would be possible to support overlapping energy bars with only
relatively little efficiency loss, but it would be fairly complex to
implement.
It'd certainly be alot easier in OpenGL since OpenGL is based on this
"update the entire screen every time anyway" paradigm.
David