Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


I've been messing about some more with indestructible tiles and have been wondering whether such things are better done using objects, either by a game entity or as an object tile layer. With an explicit object it'd give me more freedom to move it around and do things with it; it'd also be simpler to animate as it becomes divorced from the tilemap itself.

Storing the collision map is interesting. At the moment I'm not doing it properly, I'm still using the original tile info. My plan is to store some info about the collision info in a separate tilemap. The original plan was to use an array of bools, I may still use this - but I'm pondering whether I could pack the data into ints instead. So an int holds 32 bits, which coincidentally is the width and height of my tile. If I have a couple of ints, I can pack in the collision info for the whole tile and do some quick block or row tests. If the value is 0, I can immediately know that the block is empty and move on instead of trying to test each pixel in between. It does feel like premature optimisation though...
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!