Path: chuka.playstation.co.uk!news From: "Andrew Murray" Newsgroups: scee.yaroze.freetalk.english Subject: Sine & Cosine Lookup Tables Date: Mon, 9 Dec 2002 12:58:03 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 27 Message-ID: NNTP-Posting-Host: pc-80-195-74-17-dn.blueyonder.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Hi All, To put it short, I'm trying to do a clone of Smash TV using both digital movement and analogue movement. I've got the digital down and dusted but the analogue is a *tad* more difficult. Originally I was doing a vector subtraction between the aim vector (the right analogue stick), and the player position vector then normalising this which utalises a magnitude function (therefore a square root function... everything is in fixed point). However, the fixed point square root is giving me Aritmetic Overflow Errors. Now I want to try sine cosine lookup tables as I've heard they are faster and require less fiddling than my previous method did. Does anyone have any examples of how I would implement a sine & cosine lookup table and convert the analogue reading into a vector of direction for fired bullets using them? I'm sure Matt Verran would be able to suggest something as the game I'm doing requires the same analogue firing mechanism as is in (the excellent) RobotRon. Any help is much appreciated! Andrew. P.S. Merry Chrimbo!