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.

Code Snippets / Smoke v2

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 26th Mar 2006 19:38
Create realtime smoke particles with the following code, its easy to implement in your game:
gimme credits:p
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 26th Mar 2006 19:41
Looks great! And if you flip it upside down, increase the speed a bit and use a blue/whitish colour you'll get some cool water effects as well. Awesome.

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 26th Mar 2006 19:45 Edited at: 26th Mar 2006 19:53
actually you can use it for anything..
make the xyz coordinates dynamic and fix it to the back of a car, there ull get car smoke (sorry my english)

put it under a yacht swimming across the water and ull have water splashes..etc.

EDIT: add this in the loop to see dynamic smoke position
_ RealUnReal _
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Dudley, UK
Posted: 27th Mar 2006 01:51
Wow, eye candy.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 28th Mar 2006 15:12
Very nice.

Boo!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Mar 2006 12:39
thats pretty neat.


Hawkeye
21
Years of Service
User Offline
Joined: 19th Sep 2003
Location: SC, USA
Posted: 29th Mar 2006 21:36
That's some pretty sweet looking particles effects there mate *sticks code in nifty stuff folder*


I am but mad north north-west; when the wind is southerly I know a hawk from a handsaw - Hamlet, Hamlet
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 30th Mar 2006 15:57
awesome smoke effect!!

but when i press space,nothing seems to happen. ?
Evil Booger
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: My evil lair
Posted: 3rd Apr 2006 04:49
Wow.......wow.

boogers will take over the world
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 4th Apr 2006 04:30
that is some sweet smoke. Great job
ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 5th Apr 2006 00:33
preety tight

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 11th Apr 2006 11:12
Here is a rocket trail effect:


Too Sexy
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 11th Apr 2006 13:57
Great looking smoke there Cucumber - nice work!

RaceGT
19
Years of Service
User Offline
Joined: 15th Aug 2005
Location:
Posted: 13th Apr 2006 09:49
This is a great effect that looks great, but I notice a problem that I've noticed with some of my other DB projects that use this kind of method:

The effects move very fast (maybe even too fast without some sort of code to make them run at a fixed frame rate), when they are far from the camera and small within the camera's field-of-view. But, get the camera very close, especially to one of the larger ones, and the frame drops dramatically. Now, I know there are many, many objects being used (and textured objects at that) to create the effect, but it's very much like a problem I was having in re-creating an old arcade game:

I too decided to just use "3D objects as srites", i.e. texturing a plane (plain) (?) (you know what I mean) to act as a sprite. It was for clouds to be in the game, then I could just position the objects in 'layers', so the clouds would appear to be in front of and behind other clouds. I found the same problem though. Some clouds (the objects) would be randomly scaled, to add variety to the clouds, but if the scale of *1* object got too large, the slowdown would begin. It seems that the larger the textured image becomes in the camera view (and closer to full-screen size), the slower it is. And this is even with an only 256 x 256 texture. I didn't think there would be that much slowdown just to show one or 2 objects nearly full-screen.

http://www.geocities.com/crmnlelmnt/
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 13th Apr 2006 11:48
those plain objects are alpha mapped, and when you get your camera close to them, and especially when the zdisabled plains are showing one after the other away from the camera,its normal that your graphic card is having problems..nothin to do about it.
if you want constant frame rate add a timer value in this part:

just multiply the values with your timer value.

Too Sexy
Nul error
19
Years of Service
User Offline
Joined: 12th Aug 2005
Location:
Posted: 14th Apr 2006 06:19 Edited at: 14th Apr 2006 06:22
Its pretty good its insanely easy to implement compared to older smoke code.

as shown in the screenshot using your code it makes alot better looking.

one fix you need is change "Function makeParticles(num, amount, x, y, z, particleCounter, image)" to
"Function makeParticles(num, amount, x As Float, y As Float, z As Float, particleCounter, image)" at the function.

Attachments

Login to view attachments
Evil Booger
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: My evil lair
Posted: 14th Apr 2006 06:30
cool

boogers will take over the world
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 14th Apr 2006 10:48
Quote: "Its pretty good its insanely easy to implement compared to older smoke code."

well, thanks i try to make all snippets easy to implement.

Too Sexy
Laak
18
Years of Service
User Offline
Joined: 26th Mar 2006
Location:
Posted: 16th Apr 2006 04:21
awesome!!! will prove quite useful. keep up the good work.

Login to post a reply

Server time is: 2024-11-23 07:27:25
Your offset time is: 2024-11-23 07:27:25