tank-dev / tank

A 2D C++ game engine taking inspiration from FlashPunk
Boost Software License 1.0
12 stars 3 forks source link

Tilemaps #69

Closed Anstow closed 10 years ago

Anstow commented 10 years ago

I feel like it would be nice to have a Tilemap class.

qualiaa commented 10 years ago

I agree.

Anstow commented 10 years ago

It seems like the most natural thing to do is to use the frame list as a backend and create a new class for animations.

qualiaa commented 10 years ago

That's possible. I think that it should fulfil a collision-detection role as well, e.g. CollisionGrid

Anstow commented 10 years ago

For the moment I'm calling the base class a SpriteSheet.

qualiaa commented 10 years ago

It's possible I misunderstood you. I thought you meant a tile-grid for maps. FrameList currently allows you to have a spritesheet and specify an index into it - see the Tile and Player classes in Stranded.

Anstow commented 10 years ago

Yes, I'd misunderstood the current code.

qualiaa commented 10 years ago

You may be right about it being better as a derived class. It made sense aggregating image before, but it's been revised since then. I'll look at it once my exams are finished.

Anstow commented 10 years ago

A tilemaps class has been added. It could do with some more features but this is done for now.