Movement in a plane.

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.

don’t know what breakout is… but you mentioned a ball :slight_smile: I’m writing a football game currently, so…
I did the ball thing through trigonometry on triangle. it’s pretty simple, basic highschool math (at least where I’m at).

SOHCAHTOA

Sin = Opposite/Hypotenues
Cos = Adjacent/Hypotenues
Tangent = Opposite/Adjacent.

If moving from x1, y1 to x2, y2 then delta X is the adjacent, delta Y is the opposite, and the line from x1,y1 to x2,2 itself is the
Hypoteneus.

Thanks - that helps a lot. I’m stupid

Naw, not stupid, justa n00b at games 8)

Stupid people are n00bs who DONT realize they have a lot to learn :slight_smile: