computer pong paddle

Started by
20 comments, last by phil67rpg 10 years, 4 months ago

 
 
if (vel_y <= 0 && vel_y >= -659) 
{
vel_y-=5;
}
 
 
if (vel_y >= 0 && vel_y <= 659)
{
vel_y+=5;
}

Phil, walk through the code with your mind, and think about what vel_y will do under different situations.

Basically, your 2nd variables you check doesn't need to be velocity, it needs to be position.

If you can't get this, stop trying. You gave it a good try, but this isn't the fields for you.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Advertisement

thanks beer but I still like to figure things out, I am doing this just for fun.

This topic is closed to new replies.

Advertisement