Sunday, February 20, 2011

Tiles and Sprites

I've been working through getting a way to do raycasting into the engine.  While doing this, I created a Tile resource type which contains a solidity map to assist in detecting per-pixel collisions.  However, after going through all the work to get a new class created, which extends from Sprite, I realized that Sprites themselves should probably have the functionality too.  I guess I'll probably end up rolling this all up at a later date.  While I'd like to have a distinction between sprites and tiles, I don't know if it makes sense to have a class just to represent that.  Maybe it'll come down to a flag to indicate type.  In the end, I hope to get a tilemap renderer worked out so I can create tiled levels with ray casting and pixel-perfect collisions.

No comments:

Post a Comment