Computer Science Canada Particle Engine |
Author: | zero-impact [ Sun Jan 18, 2009 10:14 pm ] | ||
Post subject: | Particle Engine | ||
This is a revamped version of a particle engine I made last year. It now runs much much faster. The controls are as follows: Hold space bar to attract the particles to the mouse. Hold Control to repulse the particles away from the mouse. Click and hold the mouse to spawn particles. Any tips, comments or criticism are greatly appreciated ![]() Note: Try playing around with some of the constants for different effects. Also if it is running too slowly for you just change the MAXPART constant. As well as in the graphics procedure you can uncomment the drawfillbox for a neat effect ![]()
|
Author: | saltpro15 [ Sun Jan 18, 2009 10:15 pm ] |
Post subject: | RE:Particle Engine |
cool, great job lawson ![]() |
Author: | Amit [ Sun Jan 18, 2009 10:29 pm ] | ||||
Post subject: | Re: Particle Engine | ||||
Very impressive, this is one of the better particle engines I've seen. Just one thing I saw, you wrote
Another way to do this would be
It does that same thing, but it gets rid of the unnecessary else statement. |
Author: | zero-impact [ Sun Jan 18, 2009 10:29 pm ] |
Post subject: | Re: Particle Engine |
Hey uhm saltpro I dont believe I know who you are? and thanks Amit, I'm glad you caught that ![]() |
Author: | Amit [ Sun Jan 18, 2009 10:34 pm ] |
Post subject: | Re: Particle Engine |
No problem, glad to help. One other thing, there is a constant FRIC that never seems to get used. Something you were going to include? |
Author: | zero-impact [ Mon Jan 19, 2009 7:34 am ] |
Post subject: | RE:Particle Engine |
Oh yea it was just to stop the particles from sliding along the floor but the air friction works fine. |
Author: | saltpro15 [ Mon Jan 19, 2009 1:15 pm ] |
Post subject: | RE:Particle Engine |
drew |
Author: | zero-impact [ Mon Jan 19, 2009 3:06 pm ] |
Post subject: | Re: Particle Engine |
oooh hey |
Author: | SNIPERDUDE [ Thu Jan 22, 2009 10:18 am ] |
Post subject: | RE:Particle Engine |
This is a great improvement from last years, I remember it quite well. I'm very surprised at the speed it's running, much faster than mine or any other I've seen, kudos. One thing that should be done I think is make the particles go invisible when the particles stop moving or have a constant altitude (stop moving vertically). Awesome job 8) |
Author: | zero-impact [ Thu Jan 22, 2009 6:42 pm ] | ||
Post subject: | Re: Particle Engine | ||
Thanks a lot SNIPERDUDE. I'm very surprised that you actually remembered that from the first version I posted. This is just a small modification I did to show my teacher some things you could do with it.
|
Author: | saltpro15 [ Thu Jan 22, 2009 6:51 pm ] |
Post subject: | RE:Particle Engine |
oh lawson, just had to one-up paul's particle engine eh? xD |
Author: | A.J [ Thu Jan 22, 2009 9:01 pm ] |
Post subject: | Re: Particle Engine |
congrats ![]() you really outdone yourslef ![]() instead of the stars and the constantly shrinking/growing ovals, why not actually have particles instead ? (like dots, for instance) but u did a really good job ![]() well done! |
Author: | zero-impact [ Fri Jan 23, 2009 12:31 pm ] |
Post subject: | Re: Particle Engine |
Drew- lol not really. Just seeing his inspired me to improve mine a bit. A.J. - You can very easily change it back to particles if you look at the gfx procedure. You just have to take out the if statements and replace it with drawdot (part (i).x, part (i).y, part (i).col) ![]() This is a miniputt game a friend of mine did for his final assignment. It uses the particle engine for the stars. |
Author: | saltpro15 [ Sat Jan 24, 2009 4:11 pm ] |
Post subject: | RE:Particle Engine |
well now you and paul have me interested in making a particle engine... oh + bits btw |
Author: | zero-impact [ Sat Jan 24, 2009 6:11 pm ] |
Post subject: | RE:Particle Engine |
Haha ok well if you make one make sure it is better than both of ours combined :p ![]() |
Author: | corriep [ Sat Jan 24, 2009 6:46 pm ] |
Post subject: | RE:Particle Engine |
Alright lawson, it's better than mine and faster, are you happy? |
Author: | saltpro15 [ Sat Jan 24, 2009 7:51 pm ] |
Post subject: | Re: Particle Engine |
Quote: Haha ok well if you make one make sure it is better than both of ours combined :p pff of course, heck I'll just make Quake 3, i've got nothing better to do ![]() |
Author: | zero-impact [ Sat Jan 24, 2009 8:39 pm ] |
Post subject: | Re: Particle Engine |
Quote: Alright lawson, it's better than mine and faster, are you happy?
This wasn't about beating yours in any way.. well maybe just a little.. ![]() Yours is far more flexible then mine anyways ![]() |
Author: | SNIPERDUDE [ Sun Jan 25, 2009 9:38 pm ] |
Post subject: | RE:Particle Engine |
No problem man! I think the visual effects for the engine was a cool twist, could easily liven up any game. +20 bits |
Author: | zero-impact [ Sun Jan 25, 2009 9:50 pm ] |
Post subject: | Re: Particle Engine |
Thanks ![]() |
Author: | saltpro15 [ Sun Jan 25, 2009 9:59 pm ] |
Post subject: | RE:Particle Engine |
i still surpass you in bits lawson ![]() |
Author: | SNIPERDUDE [ Sun Jan 25, 2009 10:13 pm ] |
Post subject: | RE:Particle Engine |
Muhahaha! +7 bits |
Author: | zero-impact [ Sun Jan 25, 2009 11:30 pm ] | ||
Post subject: | RE:Particle Engine | ||
Bwhuahahahahaha Thanks SNIPERDUDE ![]() I also found replacing the drawdot with drawline between the current x,y and prev x,y yielded quite neat results.
|
Author: | saltpro15 [ Mon Jan 26, 2009 10:32 am ] |
Post subject: | RE:Particle Engine |
with the +2 bits for writing this I overtake you once again lawson ! |
Author: | saltpro15 [ Mon Jan 26, 2009 10:33 am ] |
Post subject: | RE:Particle Engine |
oh btw that new effect looks a lot like Saad's prsyx game, it's cool |
Author: | SNIPERDUDE [ Mon Jan 26, 2009 7:16 pm ] |
Post subject: | RE:Particle Engine |
for an even cooler effect replace the "drawline" with "drawbox". |
Author: | saltpro15 [ Wed Jan 28, 2009 11:26 am ] |
Post subject: | RE:Particle Engine |
ha i love this thing ![]() ![]() |
Author: | Michael516 [ Fri Feb 06, 2009 4:55 pm ] |
Post subject: | RE:Particle Engine |
These are awsome programs, my favourite is the one with the lines. |
Author: | saltpro15 [ Fri Feb 06, 2009 5:37 pm ] |
Post subject: | RE:Particle Engine |
I like the drawbox, how did you make it so much faster than the last one? |
Author: | SNIPERDUDE [ Sun Feb 08, 2009 8:14 pm ] |
Post subject: | RE:Particle Engine |
Most likely a more efficient coding. Less loops, etc. |