Its easy. You make a grid using an array
dim grid(width,height,properties)
properties being different items that can go on the tile. For example say that if grid(width,height,1)=1 means that a character is on a certain grid spot. You move him left, thus changing the last position to grid(width,height,1)=0
and the new position to grid(width,height,1)=1. Now lets say grid(width,height,2)=1 means theres an obstacle on that grid square. You test if there's an obstacle on the grid square you want to move to, if there is, you dont move, otherwise, you do.
Whatever I did I didn't do it!