Path: chuka.playstation.co.uk!news From: "SCEE" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Rotation problems Date: Mon, 9 Mar 1998 09:04:14 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 66 Message-ID: <6e0b61$iap23@chuka.playstation.co.uk> References: <35007aa1.25789418@news.playstation.co.uk> NNTP-Posting-Host: 194.203.13.10 X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Hi Robert, This problem is expected with the PSX, and is due to the texture cache being thrashed. Because the PSX is designed for 3D texturing it has a relatively small ( I believe 64y by 32x for 8 bit textures ) cache that is used for drawing. Your problem occurs because you are rotating a large sprite ( that isn't on cache ) As the sprite rotates you achieve the dubious state where every pixel drawn on screen ( and off the top or left of the screen ) forces a texture cache line read. This effectively gives you a 4-5x slowdown when compared to drawing smaller textures. ( Funnily enough you can see the same kind of slowdowns on a PC software renderer - but since the D-cache is so big the textures have to be very very large.... ) Oops... Just read the rest of your Email again... The PS doesn't draw polygons with a height >512 This may explain your flickering. The only way to achieve optimum performance is to tile your sprite (8 bit ) as 64y by 32x. Cheers, Colin. Robert Swan wrote in message <35007aa1.25789418@news.playstation.co.uk>... >I've been using rotation on sprites extensively in my game, but have >come up with the following problems that REALLY annoy me. Is there >something obvious I am doing wrong, or is it (as I assume) yet another >bug in the psx (I was going to put 'another' in caps, but thought two >capitalised words would merely annoy) > >I have a sprite of size 256 by 256. (8 bit). It is perfectly within a >texture page. I put it on screen, with about 5 others, and the >computer slows right down; ridiculously so. Considering the processor >can handle several hundred 32 by 32 sprites per frame, a couple of >256x256 should be no problem. But it gets worse. I really wanted to >have these sprites zoomed by a factor of 2 and rotating. What happens >is that the sprites flicker on and off at random, and slow down the >game even further. I tried a workaround of using a 128x128 sprite and >zooming it by four, but to no avail. here are some strange results >I've found - > >256x256 sprite - very slow >256x256 sprite with rotation and/or scaling above x1 - not only very >slow, but flickers on and off >128x128 sprite with scaling x2 works >128x128 sprite with scaling above x2 and/or rotation flickers and >slows down >smaller sprites than 128x128 when scaled above x3-4 with rotation it >appears that certain angle values are ignored. Eg, when at angles >1024, 2048 etc it draws it as though at angle 0 > >These problems are wierd and annoying. It now means instead of having >a lovely huge 256x256 sprite scaled to be over a screen in height I >now have to settle for a measly 128x128 sprite that looks tiny >(especially since I switched my game to hi res mode) > >I've got enough packet workspace... any suggestions before I smash up >my university's property? > >Robert Swan >rs108@mdx.ac.uk >http://www.netyaroze-europe.com/~middex2