I've got a basic RTS map with different minerals, fog, and a minimap. I have it set up as a 100x100 grid of 32x32 tiles. The only tiles drawn are the minerals and the fog, the 'grass' is not drawn as a tile but just as a big rectangle in the background. I originally used Plot() for my minimap, but with 100 tiles this was too slow so I sorted the minerals into clusters. Basically the top-left mineral tile in each cluster is recorded as 'clustx' and 'clusty', and depending how many tiles are in the cluster, it's width and height are set to 'clustwidth' and 'clustheight'. I then draw at the top left of the screen all the clusters, where one tile is one pixel. Ignore the fact that all minerals are drawn from the start even though they havn't been found yet. My problem is: As you move to the right of the map, it appears that the minerals clusters on the minimap are disappearing, but that are actually being drawn underneath the minerals and fog. This doesn't make sense as not all the clusters disappear, most of the ones on the right do not. Also, I am drawing the clusters in the minimap [b]after[b] drawing the minerals and fog. Why is this happening and how do I fix it? Sorry for the lack of comments, I tried to simplify it from the version I originally had.
-Thanks
|