Path: chuka.playstation.co.uk!chuka.playstation.co.uk!chuka.playstation.co.uk!not-for-mail From: Lewis_Evans@Playstation.sony.com Newsgroups: scee.yaroze.programming.2d_graphics Subject: Rotation problems Date: 9 Mar 1998 14:57:44 -0000 Organization: Sony Computer Entertainment Europe - 119.SS5 Lines: 67 Sender: news@chuka.playstation.co.uk Message-ID: <6e1018$jfi1@emeka.playstation.co.uk> Reply-To: Lewis_Evans@Playstation.sony.com NNTP-Posting-Host: emeka.playstation.co.uk From: Lewis_Evans@Playstation.sony.com To: news@playstation.co.uk You can achieve the effect you're looking for using smaller sprites; just chop the large texture into small rectangles, each of which fits in the T-cache. If you want to draw the large sprite several times, then you can minimise the texture cache hit by using smaller tiles; eg get the tile for the top left, draw that N times (no cache reload), proceed to next tile, etc. Another way to minimise cache reloads is to prefer 4 bit to 8 bit to 16bit. (Best to use Photoshop/Paint Shop Pro for reducing colour depth as TimUtil has a very poor algorithm). You could also consider dropping the requirement of rotation, and gaining a large speed up by using MoveImage. (Dropping rotation would also make the sprites alot quicker). Lewis PS Colin forgot which way the texture cache goes, it's 64 wide by 32 down in 8-bit mode, 32 by 32 for 16bit and 64 by 64 for 4 bit. 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