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 / moving a object randomly around the screen?

Author
Message
TheCodeHasEyes
14
Years of Service
User Offline
Joined: 21st Oct 2010
Location:
Posted: 25th Oct 2010 13:40


hi, the above code is for a pong game im working on, try it. its all ok so far. what i need help with is moving the sphere at random, tried everything and also done forum search, google search, and youtube search, nothing!!
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 26th Oct 2010 09:43
Hi, I'm assuming that when you say "moving the sphere at random" you mean moving it in a random direction. Anyway I modified your code snippet and I hope this is what you are after.

Press the spacebar to reset the ball


Hope this helps

A clever person solves a problem, a wise person avoids it - Albert Einstein
TheCodeHasEyes
14
Years of Service
User Offline
Joined: 21st Oct 2010
Location:
Posted: 26th Oct 2010 10:29
Hi Hodgey.

thats perfect, thanks. i thought it had something to do with wrapvalue after reading the help files within dbpro.

thanks.

Login to post a reply

Server time is: 2024-11-23 07:51:58
Your offset time is: 2024-11-23 07:51:58