Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: multiple problems incoming.... Date: Thu, 07 Jan 1999 16:55:21 +0000 Organization: Sony Computer Entertainment Europe Lines: 56 Message-ID: <3694E6F9.29B29028@scee.sony.co.uk> References: <772l5i$7712@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en robert anderberg wrote: > > I have sent the code for my game RoboWars because I have a few > of problems which are not in the FAQ's, these are as follows : > > 1. Some objects on screen seem to flicker at some camera angles, > when this happens the debug font also flickers Increase the size of your packet area. If you're running in interlaced mode, you may be running out of CPU and/or GPU time within the frame, causing frame dropout. Interlaced games _must_ run at 50/60 frames per second > 2. The floor overlaps the robots at some points If the robots are always above the floor, put the floor and robots into separate OTs, and draw the floor OT before the robot OT. Alternatively, sort the floor into the same OT as the robots, but always sort it after the robots. > I would also welcome any advice on the following : > > * fading sprites from solid to transparent (not just setting semi-trans) Messy - if you've got sprites that you want to fade into the arbitrary background smoothly, you have to do some tricky stuff. Firstly, create an all white 'mask' of your sprite (i.e same size/shape as your sprite, but completely white, and completely black where the sprite is transparent. Then for fade level X (between 0 to 1): Sort the mask as semitrans, 100%b - 100%f, with a brightness of of 255*(1-X) Sort the sprite as semitrans 100%b + 100%f, with a brightness of 255 * X > * converting a point from the world coordinate system to an object's > local coordinate system, I need to be able to do this for collision > detection You have the local to world - the inverse of this matrix is the world to local! Now, my brain's feeling a little tired so I can't confirm, but there are about 3 ways to do this: 1) If it's really hard, you'll have to do all that row reduction stuff to find the inverse of the matrix. Not too hard, just slow and potentially inaccurate. 2) Look at the algorithms in the matrix tutorial ( http://www.netyaroze-europe.com/~jruss1 ) that calculate the Local To World To Screen. Just do exactly the same thing, except reverse the order of the matrices in the equations. Ie instead of Local2 * Local1 * World, go World * Local1 * Local2. 3) Transpose the local to world matrix. This only works if the matrix is orthogonal, but my current caffeine level is too low to confirm. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Diets are for those who are thick and tired of it.