If I may be so bold as to elaborate a little further on what Phaelax suggested, let's say that you have a screen size that is 640x480. For the sake of argument, we'll say that this is the entire map for a level.
Now, we don't want to look at every single pixel (like you said), we want to look at tiles.
Make an array that stores all of the tiles and assign values to those tiles that represent borders, or doors, or mountains, or whatever you want. The tile size (how many pixels tall and wide) will help determine the size of the array.
Let's say an individual tile size is 32x32. On a 640x480 screen, we will divide the screen size, by the tile X size and the tile Y size. This will give us our array's dimensions:
640/32 = 20 tiles in the X direction
480/32 = 15 tiles in the y direction
We now know our array is 20x15 tiles big:
Back to identifying what is on a tile; we assign individual tile locations a number that represents some feature on our map. For example:
emptytile = 0
grass = 1
tree = 2
door = 3
impassableborder = 4
Then assign the values to the array where these features exist. So if a tree is in the upper left hand corner of the screen at tile position 1,1 then:
Apply this method to your whole array representing the features on the map.
Now back to what Phaelax was telling you. When your character is moving around the map, you can find out exactly what tile they are on by dividing their screen x and y positions by the tile size (32X32).
So if your character is at 357 X and 310 Y then they are on tile:
357/32 = 11
310/32 = 9
Now, since the actual screen coordinates start at 0,0 then you have to ADD 1 to the values to keep it lined up with your array
tilex=(357/32)+1
tiley=(310/32)+1
Then you just plug those values into your array and you know exactly what feature you are over or are trying to move to:
feature=tiles(tilex,tiley)
rem then do your collision testing:
select feature
case empty
rem do something
endcase
case tree
rem do something
endcase
etc.
endselect
There are variations of this method, but I'm guessing Phaelax was hinting at something like this.
Enjoy your day.