Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: Elliott Lee Newsgroups: scee.yaroze.beginners Subject: Re: Getting a sprite to leave a trail Date: Wed, 03 Jun 1998 14:40:02 -0700 Organization: Cisco Systems Lines: 57 Message-ID: <3575C2B2.48A863A4@netmagic.net> References: <356C9B7A.C18CCEE4@easynet.co.uk> <3575B927.1D3140CD@mail.datasys.net> Reply-To: tenchi@cisco.com NNTP-Posting-Host: dhcp-e-39-237.cisco.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.03 [en] (Win95; U) Well, if you're going to go this route, the screen will become a mess unless you have a way of "degrading" the impressions of the image beforehand. I would suggest overlapping a semi-trans filled rectangle over the frame buffer and then throw your new graphics on top. If you're writing an demo intro, this could create some sweet effects. :) The only problem I see with this is that since you have 2 frame buffers, the amounts of trailing are going to be different because the updates to each frame only happen every other frame. One way to compensate for this is to let the Yaroze always display frame buffer 0 and only draw in frame buffer 1. Wait for the vsync interrupt and then do a MoveImage() from buffer 1 into buffer 0. This would ensure that you have a "perfect" copy of the workspace at the cost of the extra GPU cycles to copy memory... Darco wrote: > > Ï<ò wrote: > > > > Hello all > > > > Could anyone give me some clues on how to get a moving sprite leave a > > trail behind it? Would I need a new sprite for each bit of the trail, > > each with its own level of brightness, to give the impression of the > > trail fading away? > > The easiest way to do this is by not fully clearing the screen at each > refresh. Unfortunately, this will only look right with a static > background, but the method might still be useful. Instead of sorting a > primitive to clear the screen; sort a rectangle primitive that fills > the entire screen. Color it black, but enable transparency. (I'm not > sure what the correct transparancy level should be, you will have to > play around with it. It's only 4 different possibilities, just go > through them all untill you find one that looks good.) > > This should leave a "trail" of a sprite behind it as it moves. The > trail will shake a little bit, but it will fade out quickly so I don't > think the player will notice too much. > > BTW: I haven't tried this, this is all theoretical stuff that I've > been thinking about. Give it a try and tell me how it worked. > > -- > 'Darco > darco@NOSPAM@bigfoot.com > > (Replace "@NOSPAM@" with an "@" to email me) > > UIN: 1454810 (You can page me at http://wwp.mirabilis.com/1454810) > Voria: http://www.datasys.net/users/stu/rquat/voria > PGPKey: http://www.datasys.net/users/stu/rquat/pgpkey.txt -- - e! tenchi@netmagic.net http://www.netmagic.net/~tenchi/yaroze/