Working on a Worms-type game, I have my objects in bounding boxes and they sit on the pixel terrain.
Currently I am able to successfully do the collision detection for objects when they enter the game by checking the middle-bottom pixel of the bounding box, if it is solid, reduce the x and y velocity to 0, other wise keep moving down at a value of gravity.
The trouble comes in when I start to move the "player sprites" as they can walk into walls and I'm not sure how to approach how to detect collision if moving into pixels, and finally how to resolve these collisions.
I need to be able to detect solid walls I cannot pass, and gradient hills where the player should "walk up".
Could you help point me in a way to do this or how it has been done in the past?