Path: chuka.playstation.co.uk!news From: sosman@terratron.com (Steven Osman) Newsgroups: scee.yaroze.beginners Subject: Re: One more question.... Eeeeek..... Date: Mon, 24 May 1999 15:11:26 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 47 Message-ID: <37496af4.328569978@news.playstation.co.uk> References: <7ibn8k$sfd7@chuka.playstation.co.uk> NNTP-Posting-Host: 209.27.57.69 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.452 Loz, When you think about it, it is rather simple. Why does a snooker ball behave the way it does? It does so because it has a certain "speed". Lets say, every second it edges two centimeters to the right, and one centimeter in to the table. What happens when it hits the right wall? It now "bounces" back and moves 2 centimeters per second to the left, and still moving one centimeter per second into the table. (until it hits the far end, in which case, it starts moving "out" of the table, back to you). Basically, that is what you will need to do with your timer. Pick a "speed" at which you want your timer to travel. Perhaps one point down and one point to the right each time you draw the screen. All you have to do is increment the X and Y coordinates once each loop. Finally, when it hits the edge of the screen, you need to move in the opposite direction to that. I say you give it a shot and try to write it instead of someone else writing it for you! After all, how will you solve a complex problem in a fighting game when you are a professional developer, if you can't try and solve a smaller problem today! Steven On Mon, 24 May 1999 15:19:44 +0100, "Loz Dyer" wrote: >Sorry i'm so pathetic and have to keep coming here. Thank you, Derek, for >helping me with my timer program. > >The timer program now changes colour, pause/unpauses, stops when you hit a >side, and so forth. My mentour, Jon Cousins has seen it and he wants me to >make a program where the timer bounces around the screen on it's own, like a >snooker ball. I'm not sure where to start, can someone point me in the right >direction?? > >I've attached the timer program. Type "auto.txt" in siocons to run it. The >source is main.c > >Byee! > >Loz > >