Not sure what you mean by top down game...but i think ill be able to help you out a bit hopefully. All most all 2d games (metroid,megaman,rpg's,zelda,ect) use tiles to make up the worlds. With tiles its real easy to do collision detection. All you do is in your tile structure you have something like a int terran modification;

then when you move you can do something bout like this.

if(map[playerx][playery].type=1)playerx = old.x,playery=old.y;

Hope this helps some if you need more info i can send you some examples.

ok here is somewhat of a example if you need more email me at lordvar@in-tch.com and ill see what i can do.

typedef struct map{char tile; //tile id(pic of tile to draw)char type; // any flags for the tile.(up to 255)}

map CurMap[200][200]; //array of struct map.

Now what you do for collision detection is like thislogic(){int oldx = playerx;int oldy = playery;now you do your movment checks likeif(key_up)playerx--;and so on. now after that we goif(CurMap[playerx/tilesize][playery/tilesize].type = 1){playerx = oldx,playery=oldy;}

Hope this helps. You might have to add some stuff if your player sprite is bigger or smaller than your tile size.