Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Particle Engine

Author
Message
DreamCodersRealm
21
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United States
Posted: 29th Oct 2002 23:19
Hey! I posted this in the NewComer's forum even though I am not one however I didn't get any respones. Please tell me where I can find the source code to some good particle demos. Thanks!


GOD Bless you Always my Friends!!!!
I love GOD and Asian Girls! I am gonna marry and Asian girl one day!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 30th Oct 2002 00:21
There you go. Yellow particles that spew from the mouse pointer.



It took me a while to write that code ages ago, but you can use it.
stars(i,1) - x velocity
stars(i,2) - y velocity
stars(i,3) - particle x position
stars(i,4) - particle y position
stars(i,5) - particle colour fade value, also to remove finished particles.

Of course this is for a 2d particle effect. You can mess about with some of the velocity variables, although the code is not terribly well structured. It's easy enough to put into 3d, just add extra array columns for z velocity and z position. See if you can understand that code anyway, so you can write your own tailored to your needs.

For DBPro's excellent particle system, use this code:



Again it's not the best structured code, but easy enough to understand.
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 4th Dec 2002 16:16
hey DreamCodersRealm, have you looked at
http://www.darkbasicpro.com/apollo/view.php?t=1678&b=10?
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 4th Dec 2002 16:20
Reece Fowell,
replace ink rgb(stars(i,5),stars(i,5),0),0
with ink rgb(200,200,200),0
to change the color, do this for ex. ink rgb(0,200,200),0

Login to post a reply

Server time is: 2024-04-27 01:30:31
Your offset time is: 2024-04-27 01:30:31