I’m writing a breakout-style game. I came to write the movement of the ball yesterday and realised I don’t know how to. The approach I tried was to associate a angle and speed with the ball. I defined 0 degrees to be straight up and 90 is east etc. Given this though I’m not sure how to work out how to move the ball. For example,
My ball is sitting at 0,0 and it has a speed of 10 and an angle of 45 degrees - how do I calculate where I should move to?
So,
Is my approach a good one, or should I use radians or a different way of modelling the movement?
Is their library out there that helps with modelling simple behaviours like this?
Also, ultimately with this game I’m thinking of introducing physics and modelling things like spin on the ball and different surfaces. Is there a (free) engine out there which would be a good fit for this?
thanks for listening,
Don.
I’m writing a football game currently, so…