Fiendish said:
Actually, I've been wondering about this. Is there a way in MFC to only repaint part of the screen?
Absolutely. I used to do that before miniwindows came along. But it can be tricky to get right. And in any case, since the end result is one big bitmap, and the text scrolls, there isn't a huge amount of point.
Let's assume that the map window overlaps the text output, at least by a bit. As the text scrolls up you at least have to invalidate the text part, and then redraw it, and then blit the miniwindow back on top of the text. Which is what happens now, without all the complex calculations about which part should be redrawn.
If you have a pure text window (which we don't) then there is an API call (ScrollWindow I think) that internally shifts the bitmap vertically (or whichever way) so it doesn't need to be redrawn, and then you invalidate the last few lines, and redraw those. But you can't shift the bitmap vertically if it is even slightly overlapped by a miniwindow, because that would jump up as well, looking really really bad.
So basically to implement miniwindows I decided to get rid of selective invalidating, and just redraw the whole thing. The miniwindow are reasonably efficient themselves, because they aren't recreated, just blitted back on top of the text.
Fiendish said:
If I say "Hi Grandma" to my grandmother and she does nothing, and maybe I say "Hi Grandma" again, and she does nothing again, it doesn't do me any good if after I leave she perks up and says "Hi Grandson. Hi Grandson."
Scenario.
Your grandmother is driving you in her car down a slippery mountain road (ice, sleet that sort of thing). She is concentrating hard on the road, and responding quickly and efficiently to the curves in the road, and keeping you both alive.
So it actually does do you good that she doesn't immediately respond to your saying "Hi Grandma", it is keeping you alive. She is processing a higher priority task. When the higher priority task allows it, she responds.
I understand what you are saying about it being important for the player to feel things are responded to. In fact one of the things I like about WoW is the way that things feel very responsive. And the way they do that is, for one thing, to let you move your toon around at the client end, instantly. And then it transmits your updated position to the server. So if you happen to play alongside another player, the images on the two screens can be out of sync. On one screen you might be ahead of your friend, on another, behind him.
Ditto for inventory. If you look at your inventory it immediately appears, because it is cached locally. And the map. And quests. And I'm pretty sure even mobs have a "initial reaction" coded into them, which makes them respond and run towards you, even before the server has told them to. Eventually the server kicks in and has the final say, and sometimes you then see mobs jump around to different places.
I'm all in favour of fast-appearing responses. But I think that to a certain extent they need to be designed in. As in my suggestion of a different way of displaying speedwalks, one that is less processor-intensive.
Similarly for the spellups. I think a while back Lasher and I agreed on a protocol where you found what spellups (buffs) you had on you, and then the server just advises of changes (gain, lose one or more). That way the client always had a local picture of the spellups, and could display them promptly. |