Original Post
Hello, I'm currently delving into my first map system. I wrote some basic design documents, and as I began to implement it, I thought that maybe my design was a bit too redundant, or just unnecessary for my task. I'm using python for a tile based, overhead, 2d map system. My conflict, I believe, is in how I handle the tiles themselves. This is the class heirarchy: World class (The controller for the entire game) ----/\ tMap class (Contains list of tiles, and controls scrolling and such) ----/\ tile class (Contains tile level data) Each class contains a list of all objects, and 4 other lists for some specific types of objects: Turfs, objs, mobs, and areas. I do this so I can search through these lists on different scales. For instance, if I need to check for a mob somewhere on the map, I would access tMap's mobs list, and just search through it, or if I wanted to search for an obj at a specific tile, and search that tiles objs list. Now, what I'm curious about here, is if this is an efficient approach, or if it would be better to perhaps limit the tile class, or even remove all together? I was also concerned, since I'm developing this in python with pygame's assistance, if a system such as this could use too much memory or operate too slowly on larger maps due to pythons overhead? I'm not very well at describing myself, and I apologize for it. But if anything seems unclear, please let me know so I may attempt to describe myself better.