i'm developing a simple game, in which there are bricks , ball and a paddle where you should hit the bricks with the ball (you all know this game).
My problem is a bit complicated, the ball is moving in constant speed, let's assume 200px per second, and let's assume i have 30 frames per second. this means that each frame the ball moves about 7 pixels.
i have 2 things i do each frame : 1. draw the game on the screen. 2. move the ball, collision detection etc..
the problem is that in frame X the ball didn't hit anything yet but in frame X+1 he moves 7 pixels and then he is partially inside a brick (or partially inside two adjacent bricks which is much worse).
this happens because the movement is discrete and not continuous.
I don't really know how should i deal with it, i got this problem in every game i developed (not only for android but also in PC). probably i'm missing something crucial in my understanding of game development.
thanks in advance.