Path: chuka.playstation.co.uk!news From: "John \( QuietBloke \)" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Particle Effects Date: Tue, 23 Jan 2001 20:41:51 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 48 Message-ID: <94kq63$c2g4@www.netyaroze-europe.com> References: <94fl1f$gu61@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-168-136.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Oopp, Havent checked the newsgroups for a good few days.. or I would have replied sooner... If you want a code base to make your particle effect you could always go download Yarozians.zip from my homepage www.netyaroze-europe.com/~jdubpsx and look at the source code. You will find a a couple of files... explosn.h explosn.c. This is a very simple particle effect. The particles themselves are just lines but you can modify them to be anything you want. It exposes 2 functions. The .h file defines how many explosions are allowed and how many particles in each one. void startExplosion ( int xpos, int ypos ); - Will kick off a new explosion... if the max explosions are currently active it will remove and use the oldest one. The logic here initializes each particle giving it a start xpos, ypos, xspeed, yspeed and lifespan... change this to produce any sort of effect you like. void showExplosions ( void ); - This gets called for each screen refresh. It basically moves all the particles and writes them out to the ordering table. The current logic moves all the particles by the x and y speed, reduces the x and y speeds and finally accelerates the yspeed downd the screen ( a sort of gravity effect ). NOTE : In order to get a nice range of speeds I store all my positions, speeds left shifted by STAGE_SHIFT then right shift to get back to screen co-ords just so I can get a nice range of speeds. And there it is.. a very basic self contained particle effect ready to be modified, extended and improved... I was thinking of making all the particles transparent sprites and then you could add a scale value to each particle so they can appear to get closer or move away over time... anyway... this might help.. or it may not "Chris Wallace" wrote in message news:94fl1f$gu61@www.netyaroze-europe.com... > How can a get a particle effects in 2D? I found Tom's 3D one but couldnt get > it across to 2D. > Cheers > Chris > >