
My 2d particle library! Updated
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
6000 particles at 4 FPS, that's badShannara wrote:Looking nice, with debugger enabled or disabled, it doesnt matter, 6,000 particles slow it down to 4FPS. Still, not bad at allGot any more up your sleeves?

I think the "engine" is fast enough as long as you don't right click...
And I really want to know how I can make it even faster

And everybody, thanks for the nice comments!

I'll see if I can make it into a nice screensaver with random fireworks someday.
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
Should be able to make it faster by plotting directly in the screen buffer, but i'm not shure how to do that. (could anyone do that?)
And if there is many particles on the screen and I make new particles with mb-right it gets mysteriously slow..., but the mb-left particles don't slow down that way. I think it got something to do with linked list mess...
(but I think there might be a smart way to make it faster...?)
And if there is many particles on the screen and I make new particles with mb-right it gets mysteriously slow..., but the mb-left particles don't slow down that way. I think it got something to do with linked list mess...

-
- Enthusiast
- Posts: 149
- Joined: Wed Apr 27, 2005 11:50 am
- Location: Adelaide, Australia
- Contact:
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
dont work here with v4 final... macro error on this line :roll:
Code: Select all
If PL_Particle()\Step > PL_Particle()\Duration Or PL_Particle()\X <0> #ScreenWidth-1 Or PL_Particle()\Y <0> #ScreenHeight-1
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
I'm also using PB4 final, I don't understand thisva!n wrote:dont work here with v4 final... macro error on this line :roll:
Code: Select all
If PL_Particle()\Step > PL_Particle()\Duration Or PL_Particle()\X <0> #ScreenWidth-1 Or PL_Particle()\Y <0> #ScreenHeight-1

It gives you an error on that line if #ScreenHeight and #ScreenWidth is not declared.
Did you save both files and executed the example?
And yeah, I know it's stupid, but I don't know any other way of getting the screen width and height...
EDIT: Oh... I now see what you're talking about!
The forum messed up the code... bether download it then!
Last edited by Joakim Christiansen on Tue Jun 06, 2006 10:50 pm, edited 2 times in total.
I like logic, hence I dislike humans but love computers.
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact: