![](wink.gif)
Hidden Tiles?
Hiyas,
I''ve written an isometric engine in VB6, which is based loosely on the XCom engine. But, instead of using walls, interior objects, and floor tiles, I''m just using types of blocks (eg. the block may be solid, passable, air, see-through but solid, etc.). This is to simplify the programming, so the game is faster and easier for me to work with (hence a better chance of it getting done
).
I''ve got height working, sort of... that''s the problem. When I''m on a level higher than ground, all levels below the current one will be blitted in their entirity even if the tiles are hidden behind other tiles. How do I find out if a tile is hidden behind another tile or not? I''ve tried EVERYTHING I could think of but nothing works... Well, one method did, where I checked all 7 tiles covering the tile to blit, to see if there were solid block tiles in front of it, but the speed was just as bad as if I''d blitted all the tiles! Anyone know? Thanks for any help...
-Byron
![](wink.gif)
My engine doesn''t support multiple hight levels, but:
>
Well, one method did, where I checked all 7 tiles covering the tile to blit, to see if there were solid block tiles in front of it, but the speed was just as bad as if I''d blitted all the tiles! Anyone know? Thanks for any help...
<
If that method works why don''t you just precalculate it? Store a flag in each Tile whether it''s visible if the layer above it is drawn or not - should only have minimal memory overhead and be fast to check. You''d still have to loop through all tiles in all layers in your viewport though. This will only be a problem if you have really high buildings, in which case you should probably consider some more advanced data structure to store your level data in, some kind of tree might be appropriate then.
BuschnicK
Life would be much easier if I had the source code.
http://home.t-online.de/home/BuschnicK/
>
Well, one method did, where I checked all 7 tiles covering the tile to blit, to see if there were solid block tiles in front of it, but the speed was just as bad as if I''d blitted all the tiles! Anyone know? Thanks for any help...
<
If that method works why don''t you just precalculate it? Store a flag in each Tile whether it''s visible if the layer above it is drawn or not - should only have minimal memory overhead and be fast to check. You''d still have to loop through all tiles in all layers in your viewport though. This will only be a problem if you have really high buildings, in which case you should probably consider some more advanced data structure to store your level data in, some kind of tree might be appropriate then.
BuschnicK
Life would be much easier if I had the source code.
http://home.t-online.de/home/BuschnicK/
Life would be much easier if I had the source code.blackfish.sourceforge.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement