Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Yet another 2D pong in DBP question

Author
Message
Jac
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location:
Posted: 10th Jan 2004 10:15
Sorry but very new.

I'm slowly building my first ever game, have bats and ball and can move bats but I can't get the ball to move.



I thought that ball_x = ball_x + speed_x is in the loop so ball_x should continue to increase.

Can anyone tell me what I'm doing wrong.

HeadlessJB
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 10th Jan 2004 11:01
take these lines


and put it above/outside the main loop, because at the moment, even though your telling the ball to move, its position is always being set to 400


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Jac
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location:
Posted: 10th Jan 2004 11:16
Thanks ReD_eYe

Thats a great help.

HeadlessJC
Jac
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location:
Posted: 10th Jan 2004 18:33 Edited at: 10th Jan 2004 18:33
I've got the ball moving and even have contact with the bat but then the ball gets stuck.

I'm using this code in the main loop to try to move the ball in the opposite direction with no luck



I'd be grateful for any pointers.

Login to post a reply

Server time is: 2024-11-25 23:49:57
Your offset time is: 2024-11-25 23:49:57