Individual Entry

About

Thoughts on language, and other miscellaneous things, by Daniel "sRc" Cheney, formerly known as "The Anaconda". Also various writings.

All original site content copyright Daniel Cheney. Other characters, works, or other information referred to are held by their respective copyright holders and used under the good faith of Fair Use.

Powered by PivotX - 2.3.0
XML: RSS Feed
XML: Atom Feed
Valid XHTML 1.0 Transitional
Valid CSS
template by i-marco's choice

Redevelopment Cycle

If you had used the Castle Tilemap Editor checked in before today, you would have had to deal with a performance issue with large maps, because it was drawing the whole map, including off-screen parts, to the map window every draw call. So today I sat down to write a function to make it draw to an offscreen back buffer, only drawing what was currently on the screen, to improve the performance.

However, as I got started, it turns out I had already done that. I had properly coded it that way from the very beginning of CastleEngine. However, somewhere along the way, in dealing with bugs and crashes, it had worked its way out of the loop. So at this point it is recreated each resize and used to determine whether the scrollbars should be shown or not (a flickering issue i have to deal with, on that note), but otherwise nothing is ever drawn to it. It was all drawing directly to the window itsel.

Not wanting to reintroduce whatever bugs had worked out to end up like that, I quickly just altered the draw code to only draw the portion of the map currently displayed. However I find it rather intesting that it had devolved in such a way, then I noticed it and went to reimplement it again without even knowing it was there.


Used tags:
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • Twitter




(optional field)
(optional field)
Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.

Meta Information:

Title: Redevelopment Cycle
Date posted: 08 12 08 - 21:05
Next entry:   » High Latency
Previous entry: « Drug Induced

Frontpage

Content

Regular Spelling
Main pages of Regular Spelling. 'All Pages' contains links to all the short stories hosted on the site.

Search