My 2d particle library! Updated

Everything else that doesn't fall into one of the other PB categories.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

My 2d particle library! Updated

Post by Joakim Christiansen »

Image
A very fast particle library which you can use to create nice effects!
A fireworks example is included, press mousebuttons to test it!
Download

EDIT: New version, with much faster right click rockets!
If you like it feel free to click the paypal button on my webpage! :P

BTW:
And if you're going to use it as a includefile in your project, then you must declare both #ScreenWidth and #ScreenHeight first since it use those constants.

Removed code from forum, since the forum made a mess of it... :?
Last edited by Joakim Christiansen on Tue Jun 06, 2006 10:49 pm, edited 10 times in total.
SoS
User
User
Posts: 13
Joined: Sat Feb 18, 2006 4:46 am

Post by SoS »

Image

PB 4 Beta 3
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

I think you have to explicitly enable inline assembler in File/Preferences, Editor/Defaults, third item (checked).

Then it should work.

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
SoS
User
User
Posts: 13
Joined: Sat Feb 18, 2006 4:46 am

Post by SoS »

I got this with and without Inline Assembler. :(
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Just tested this on PB4, beta 3 and it works quite well. Didn't have ASM turned on at all.

Must say that it would look good as a screensaver.

I would like to see a self running program with random rockets and streams.

Looking good.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Doesn't work here. Inline Asm enabled or not. Just blank screen with fps continuous updates in top left corner.
Last edited by netmaestro on Wed Feb 22, 2006 4:39 pm, edited 3 times in total.
BERESHEIT
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

netmaestro wrote:Doesn't work here. Inline Asm enabled or not. Just blank screen with fps continuous updates in top left corner.
Did you read this? "Press left or rigth mousebutton to send up rockets! "
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

It doesn't work with my PB. (PB 4.00 BETA 3)

Syntax Error on line 88
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

Work fine here . PB4.0 Beta 3

Joakim Christiansen , Very nice .
Please correct my english
http://purebasic.developpez.com/
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

Beta 3 and working fine here too.

Nice work. :D
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

It was made with beta 3 and should work nice, don't know why someone got syntax errors...
Last edited by Joakim Christiansen on Tue Feb 21, 2006 12:19 pm, edited 1 time in total.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@Joakim Christiansen:
Very nice effect! Works fine here on my system with PB4 beta3 !!! no problems and no source changing required!

The effects runs here at 100 fps/s.... even when i hold down the left mouse button i get arroung 50.000-52.000 particels and they are moving still at 50 fps/sec...

i like the effect! Great work! ;)
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

Works here, too, even with Inline turned off.

I'm embarrassed to say, though, that my $25 32MB video card chugs along at 4fps if I hold both buttons for ten seconds or so... I know, time for an upgrade :)

It's a good card for game development, though, because it forces me to think optimally (literally)!

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Amiga5k wrote:Works here, too, even with Inline turned off.

I'm embarrassed to say, though, that my $25 32MB video card chugs along at 4fps if I hold both buttons for ten seconds or so... I know, time for an upgrade :)

It's a good card for game development, though, because it forces me to think optimally (literally)!

Russell
Hehe, you should get yourself a new card indeed.
But my code is also a little slow when there is much particles on the screen and the right mousebutton rocket explodes, it's weird...

And yeah, it's smart to do game developing on a old/slow machine!
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

@joakim christiansen: Thanks for all the work you did on this, it's beautiful. I tried it a couple days ago but didn't realize I had to press mouse buttons to see anything :oops:
Super job!
BERESHEIT
Post Reply