Tiled Map Loader updated to 0.5, and some other stuff

I've made a small update to the map loader which means it now caches images which it loads from disc, and checks to see if an image is already loaded when creating tiles and layers. This has the advantage of saving memory as images are prevented from being loaded multiple times, and also speeds up the loading of a new map if it uses the same tile sets. On the other hand the textures will remain cached for the lifetime of the MapLoader object, so useless images hang around and can build up after many map changes which can be detrimental. A work around is to clear the m_cachedImages map (std::map that is, all these maps get confusing...) on map change if you know a new map will not be taking advantage of reuse of images. Eventually I plan to add some better management where the total image count is tracked, as well as which images are currently being used, so that the map loader can automatically flush unused images once it reaches a user defined limit.

Apart from the map loader I've been extremely busy spending all my spare time on an SFML project which has meant I have had little time to write any articles here. I do have a few in mind, based mainly on my experiences of my current project, but until I get a day or so to sit down and thoroughly sort them out the blog will have to remain fairly quiet. Until then, though, you can look at this pretty video of a moon taken from my current project...

or check out some of my Let's Plays on my YouTube channel ^_^


Popular Posts