Fire and Smoke API

Member
Posts: 321
Joined: 2004.10
Post: #1
I've played around with particle engines etc many times, but I always seem to loose interest or else I'm never happy with the results. This seems like reinventing the wheel. Does anybody know of a open source plug-in, class, API, etc. in C or C++ for making explosions, fires, and smoke?

I've been admiring the game WingNuts 2 game and that is now my ideal benchmark Smile

Sorry if this is common knowledge.
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #2
what you're looking for is a particle engine. I don't know of any, but then again I've never looked, and I'm sure there's one out there.

It's not magic, it's Ruby.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #3
I think you're looking for something that's too specific. Smoke and fire, and the underlying particle engine, all generally behave a different way specific to how your game engine is set up. I suppose that with enough abstraction, it would be possible to make a library for particles (with a lot of states being set to make it work with your engine), but I haven't seen any. Do a google search for particle engines and see if anything comes up.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #4
"particle engine" is one of those expressions I find ridicolous... I mean, how do you need an "engine" to draw-move particles? They're maybe the easiest thing to move-draw...

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #5
It's not just moving/drawing them, but it's doing it efficiently with lots of them. Rasp
Quote this message in a reply
Moderator
Posts: 3,572
Joined: 2003.06
Post: #6
I know this is slightly OT, but I agree with Najdorf on the `engine' terminology. I think particle `generator' is probably a little more appropriate. However, people do like to (over)use whiz-bang words in geek speak, so googling for particle `engine' will likely yield results. Rolleyes

Particles aren't hard to manage and need not be anything more than drawing textured quads in immediate mode. Heck, particles are downright fun to program! You can be creative. Why offload it to a third-party? As an example: Spawn a fireball by drawing a textured quad, then every frame after that, fade it in, maybe rotate it a bit, scale it up, and then fade it out. Shortly after you get the first quad going, start doing the same thing with another one and maybe start it rotated a little randomly, maybe rotate in a random direction, maybe even use a different texture as part of a sequence of textures in the explosion or fire.

As for efficiency? Bah... If you're trying to draw ten thousand textured quads all at once, I'll let you in on a little secret on how to speed it up -- don't draw so many! Yeah, you can use other techniques like preallocated arrays, but whatever... They're just particles, not magic. Play around with it and see what you can come up with!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #7
AnotherJake Wrote:They're just particles, not magic.!
But you can make magic with particles! Wink Rasp
Quote this message in a reply
Jones
Unregistered
 
Post: #8
Building your own particle engine is fun!

I've got part of mine done (and sitting on the side, until other stuff is finished) it gave me a chance to look at physics stuff I hadn't done in school yet. Things like the equations for a falling body/projected body.

It also gave me lots of inspiration for ideas which I have still not completed either.

Try it! Smile
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Still can't get fire effect as good as I want... WhatMeWorry 3 3,049 Jan 16, 2007 06:27 AM
Last Post: memon