Path: chuka.playstation.co.uk!news From: george_bain@playstation.sony.com (George Bain) Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Collision detection with rotating sprites Date: 4 Dec 1998 09:31:47 GMT Organization: Sony Computer Entertainment Europe Lines: 42 Message-ID: <748a63$c3e3@chuka.playstation.co.uk> References: <01be1d86$03a1a160$0a3ddec2@guildfoc> <742u50$9lv3@chuka.playstation.co.uk> <01be1e90$e7e94160$0a3ddec2@guildfoc> <746eq9$c3e2@chuka.playstation.co.uk> <3666DDF3.EBEFDB1E@cthullu.freeserve.co.uk> <01be1ef5$5bfd4ba0$LocalHost@guildfoc> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.8 (x86 32bit) Hi Miles, I think you might have to decide whether you want your routine to be very accurate or very fast. I tend to stay far clear from sqrt(). George In article <01be1ef5$5bfd4ba0$LocalHost@guildfoc>, miles@guildfrd.demon.co.uk says... > >Yes, I've had a go with some broad tests. The method I use is less accurate >that yours, but probably faster - check a bounding square based on the >longest axis of the sprite first and then use a more precise bounding >sphere test (using the anti-christ of fast code - Sqrt). > >I like bounding spheres but there is just no quick way to calculate square >root as far as I can see. Even with a fixed point maths routine I still >have to perform at least 12+ iterations to get an reasonable approximation >of sqrt. Has anyone out there found a really quick and dirty way of >calculating it? > >By the way, for anyone reading this who hasn't got into fixed point maths >yet - do so, very quickly! For the last few years I've been used to >programming PCs with powerful maths co-processors, I did some tests using >floating point values on the playstation and couldn't believe how sloooooow >it is - but use fixed point and it really motors! > >- Miles > >Jake Turner wrote: > >> How about doing simple rectangle bounding box detection first (simple >> approximation) and then doing the proper tests. > > > >