Hi people. Can anyone tell me how to go about programming a bouncing ball, and maybe show me some example code please. I have tried, but i just can't seem to do it.
Thankyou
Devil
You must calibrate the ball setting like this :
If BallPX>=800 then
MovementX=-MovementX
endif
If BallPX<=0 then
MovementX=-MovementX
endif
If BallPY<=0 then
MovementY=-MovementY
endif
If BallPY>=600 then
MovementY=-MovementY
endif
BallPx=BallPx+MovementX
BallPy=BallPy+MovementY
DrawImage MyBall,BallPx,BallPy
I hope this help you :)
Thankyou very much filax and tony g. I really appriciate both your help.
Thanks again :)