I am currently in the process of writing my first game and am doing it in Javascript+HTML5 Canvas. The game is a top down point-click action shooter with WASD movement. Anyway, yesterday I finished implementing collision detection using circles and a quad-tree to minimize the comparisons. I throw all the bullets, players, and enemies into the quadtree. Now, that all is working fine, but I am unsure of how to handle the next step which is handling the collision on the actual level. Bullets should be blocked by walls, actors (player and enemies) should be blocked by both fences and walls, etc.
Should I define shapes to represent the walls of my level and include them as a form of object within the quadtree then use the SAT to evaluate each of the elements against anything that it may be colliding with or is there another way like creating a hidden image layer that outlines the path and then test each object's coordinates to make sure it doesn't land on a black pixel (which would indicate that it is colliding with the unmoving terrain)?
Thanks.