philazzi44 / DnDCS

DnD Client-Server
3 stars 1 forks source link

Large map showing performance problems with New Fog drawing #17

Closed philazzi44 closed 10 years ago

philazzi44 commented 10 years ago

The red area is a little more staggered than I feel it should be, considering we can easily scroll the map which should be causing the same number of repaints. That means something the Mouse Move event is doing when you're drawing a fog area is slowing things down.

philazzi44 commented 10 years ago

It's likely UpdateNewFogImage(FogUpdate) which gets called every iteration. We can probably queue up the Fog Updates and only repaint them every so often to have the same effect.

philazzi44 commented 10 years ago

Fixed by getting rid of the NewFog image altogether in favor of just drawing the Polygon's points on the fly.