Path: chuka.playstation.co.uk!news From: Phil Gooch Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Collision Detection Date: Tue, 15 Sep 1998 13:48:55 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 41 Message-ID: <35FE6237.D6C07D43@easynet.co.uk> References: <35fd5208.9088684@news.playstation.co.uk> NNTP-Posting-Host: 193.131.140.246 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Tanvir Khan wrote: > Hi, > > I am still getting nowhere with collision detection even after some > help from George Bain's sample, so I am putting some bits of the code > of the code I'm working on for your knowledge so you know whats going > on. > Tanvir, I would really start with something simpler than a 3D driving game, especially as you have no experience of programming. Do you understand what the code you have posted does, as it stands (Hint: it's not a collision detection routine). I would begin by going through one of the many sprite tutorials available. Get you first sprite on screen, understand exactly what's going on with each line of code. Then get your sprite moving around the screen. Then be able to test whether the position of the sprite fulfills certain criteria, such as being within a specified rectangular area (which is what collision detection is) Then move on to 3D. Get a single 3D object up on screen (use the 'shortest.c' code I mentioned before - it's the easiest to follow, I found) and again, understand as much of the code as possible before moving on. I've been learning C for about 9 months, and I'm still concentrating on 2D stuff for now. There's enough headaches in programming decent 2D collision detection - 3D is a whole different ball game. I'm afraid there aren't any shortcuts. You can't run before you can walk. It takes time and patience. Start simple. [Add your favourite cliche here] Good luck Phil