I want to make a small 2D game. In the game you can go in all directions(with the bird's-eye view) and can shoot. (A little bit like BoxHead http://de.y8.com/games/box_head_2play) My problem there is the collision detection and especially the response, in which the detection of a collision is not really the problem(I use for that a quad tree). The real problem is the response to the collision. For simplifying it, all objects in the game are rectangles that cannot rotate, no shapes or circles. The rectangles are represented by a vector for the left bottom corner and a vector for the right top corner. The origin of the coordinate system is in the left bottom corner(I know in games its often on the left top corner but I prefer the bottom corner). So now a object in the world is composite with a rectangle and a velocity vector. The algorithm for now is, change the velocity(For example if the user press a key) from a object(In this case the player), add the velocity on the object and at last check for collision(I leave fro now the acceleration alone).
The real question now: How I response to the collision now ? What should I do, if the quad tree detect a collision ? Is the basic algorithm right ?
Still a small question: How I can detect collision in a endless world with a quad tree(Quad trees was always limited to a specify size) ?
You see I have a lot of questions. I don't know where to start and handle/detect the collision. I hope you can help me to get started.
EDIT: I don't need/want advanced collisions/physics. I only want that a player cant go through walls and detect if a bullet hits something.