In a tile-based engine, what is the best way to check for non-tile-based collisions?
Right now I'm trying to create "collision masks" that, when needed, are placed as invisible movieclips inside the tile. The code checks the walkability of the tile and comes up with three possible returns - walkable, collision, or it finds a collision mask and consults it to see if there is a collision. I unsuccessfully tried to use BitmapData, overlaying a hitarea for the character and the mask and using a rectangle to find if there was any intersection. Now I'm trying to use hitTest with shapeflag on the mask, passing the x and y positions of my character.
Another method I've thought of but not tried yet is an array instead of the mask. The array would hold 45 values - one for each pixel in the tile (it's 45 pixels wide). Each index would represent the x, and each value the maximum y value for that x position on that tile.
I am also hoping to add in some code that makes the character slide across the tile when going straight into a slanted collision.
Which method (one I mentioned or not) would be effective and can easily implement the slide effect I want, while avoiding high CPU usage?