Original Post
Hey
I''m currently making pong, and have only made the ball to move so far.
It works exactly as I want it to, but I feel there is a much better way of getting the direction of the ball.
So far I have an enum:
enum BALL_DIRECTION { WEST,EAST,NORTH_EAST and so on....
and an int:
int ball_direction;
and to move the ball I am doing this:
switch (ball_direction)
{
case WEST: x--;
break;
case NORTH_EAST: x++; y--;
break;
} and so on.........
Could anyone give me advice on doing this a better way,
I''ve heard other people using a ball velocity but i dont understand how to use it. (like how to calculate it).
Please, any help would be appreciated!