Advertisement

My 2nd engine

Started by May 07, 2001 10:55 AM
0 comments, last by Jarski 23 years, 9 months ago
What kind of map structure should I use in iso engine similar to one in X-Com ? I was thinking that each layer should have floor tile and four wall tiles. I was also thinking that each cell could have pointer to cell above. (?) -- Pseudo -- class cMapCell { Uchar floorID; Uchar wallID[4]; cMapCell *above; } -- Pseudo -- class cMap { cMapCell *map = new cMapCell [width][height]; } Where should I store object data? In my previous engine I had cObjectList in cWorld like this cRenderer |---->cTileSet cWorld |--->cMap |--->cObjectList #ifdef SHOW_SIGNATURE //-------------------- // Jarmo Hekkanen //-------------------- #endif
Might want to have a ptr to the map cell below aswell, otherwise an effect which happens on the above floors will be expensive to proprogate downward.

Good Luck

-ddn

This topic is closed to new replies.

Advertisement