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 Professional Discussion / Single Explosions Using Patricles?

Author
Message
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Sep 2003 14:59
Is it possible to use the particle commands to make single explosions? if so how would this be achieved, currently when i use the make particle command along with all the set particle stuff if continuously spews out particles, is there a way to limit it to just throwing them all out once? Explantion/code snippets greatly appreciated
Thanks


waffle
23
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 18th Sep 2003 17:35
according to the book...

start your explosion normally....
then, to stop the explosion,

set particle emissions 1,0

1= your particle emitter
0= instruct the emitter to stop creating new particles.
particles already in motion will still complete there life cycle.

internet gaming group
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Sep 2003 18:35
i'll give it a go, thanks!


ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Sep 2003 18:47
hmmm, when i combine particles with my program i get immense slowdown suppose i'll have to do it another way


CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 18th Sep 2003 19:05
what I did in my space invaders mock up was make a particle object that runs continuously but immediately hide it. then I used show and hide particle commands to display a "burst" of particles when enemy or player gets hit. I can post code if you need because there are a couple of tricks to it as not to kill your main loop.

-RUST-
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Sep 2003 20:02
that would be good! post away


CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 18th Sep 2003 20:56


you can see the particle init subs for the particles themselves and look in the main loop for how I use them. for baddie explosions i use timer test to know when to hide the particles without holding up main loop and gameplay, for player death I use a regular for-next loop because at that point I don't mind holding up main loop.

this code will run on any dbp if you rem out the references to SOUND and MUSIC

lemmee know how it goes
peace

-RUST-
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Sep 2003 22:43
i think i get it, i've decided to do it a different way though(i'm doing destructable landscape) so i'm just gonna have some random shapes fly out, thanks for the help


CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 19th Sep 2003 00:31


-RUST-

Login to post a reply

Server time is: 2026-07-25 07:01:47
Your offset time is: 2026-07-25 07:01:47