Friday 23 July 2010

Open door

I'm writing a door class for Teemu derived from base object class. Abstract base class is kind of cool, but I still don't know what to do with map routines. Should objects be stored in 2D map anyway? The problem is in collision checking which is fastest when objects are in 2D map, but maybe there are other ways to do that, like a hash map.

1 comment:

Jotaf said...

Storing multiple objects in a tile can be a hassle to manage. I'd use either simple lists, if there aren't too many objects, or an STL multimap, "for speed". There's also the classic approach -- only one moving object (monster, player) and one item per tile.