Path: chuka.playstation.co.uk!news From: Jake Turner Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Collision detection with rotating sprites Date: Mon, 07 Dec 1998 18:42:26 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 48 Message-ID: <366C2192.E6EF54AC@cthullu.freeserve.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: modem-54.vanadium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) For fast sqrt (and other maths functions try Ian Bell's home page) sqrt page: http://people.netcom.co.uk/i.bell/maths/funcs.htm#A10 Enjoy Jake Miles Buzzing wrote: > 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. -- Jake Turner : Token Rocket Scientist ========================================= Practice VI it may save your life one day Home e-mail: jaket@cthullu.freeserve.co.uk Work e-mail: jaket@revolution.co.uk