Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: jamin1@psu.edu (Jamin Frederick) Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: non-displayed sprites Date: Wed, 06 Aug 1997 08:19:20 GMT Organization: SCEA Net Yaroze News Lines: 36 Message-ID: <33e831a7.20940496@news.scea.sony.com> References: <33E51AC3.6FB@erols.com> <33e542ff.16844962@205.149.189.29> <33E6ACF9.1161@charlie.cns.iit.edu> <33E75465.4ED2@ix.netcom.com> NNTP-Posting-Host: rotary416-pri.voicenet.com X-Newsreader: Forte Free Agent 1.11/32.235 On Tue, 05 Aug 1997 11:27:17 -0500, Spellweaver wrote: >Quoth Ed Federmeyer: > > Mario Perdue wrote: > [ ... ] > > > Setting them off screen would probably work, however, bit 31 > > > of the Sprite attribute controls the sprite display mode. > > > 0 = displayed > > > 1 = not displayed > > > > I think I don't understand something here. If you have a bunch > > of sprite data structures defined in main RAM, and don't want > > some of them displayed, why not just "not sort them" into the OT? > > In other words, only call GsSortSprite() on the sprites you want > > displayed. I'm not quite sure what you get from sorting in a > > sprite with an attribute bit 31 set to 1 (not displayed). > >If you have all of the sprites in a large array, then you can just >run through the array GsSort[Fast]Sprite()ing all of them, without >worrying about which to draw and which to skip over. I've done a little experimenting with this. It seems that frame rate increases when you only insert visible objects (on-screen) that don't need to be sorted. This is just done with a positon comparison with the sprite and the screen boundaries. Or alternatively, your sprite list could just consist of those that are on-screen, so that no comparison is done at sort time, but then you have to compare the world sprites with the screen sprites to see if they should now be added to (or deleted from) the on-screen list. It seems like the bottleneck is always comparisons of long lists of sprites. Sorry if this doesn't make total sense, it's a little late. :^) Jamin