SFML community forums

Help => Graphics => Topic started by: N1ghtly on August 29, 2011, 11:39:18 pm

Title: Explosions
Post by: N1ghtly on August 29, 2011, 11:39:18 pm
Hello forum,

I'm looking for a way to display explosions (particle system?)
I know about Thor, but it's very poorly documented so I wouldn't like to start with that. Are there any other alternatives? Or perhaps someone who can give a basic example of the Thor particle system?
Title: Explosions
Post by: Jove on August 29, 2011, 11:59:02 pm
Pyro is another system and it looks very sophisticated, but yes, particles seem to yield the best and most organic results.

If it's just for basic explosions, you could make something yourself without too much trouble. I found that the graphics you use for particles can have give profound and often unexpectedly interesting results; a lot of fun to play with.
Title: Re: Explosions
Post by: Nexus on August 30, 2011, 12:07:29 am
Quote from: "N1ghtly"
I know about Thor, but it's very poorly documented
Hi N1ghtly, as the Thor developer I would like to know how I could improve the documentation.

On the project website (http://www.bromeon.ch/thor/), there is a tutorial (http://www.bromeon.ch/thor/v1.0/tutorial-particles.html) about the particle system, an API documentation (http://www.bromeon.ch/thor/v1.1/doc/group___particles.html) and a complete example (http://www.bromeon.ch/svn/thor/trunk/examples/Particles.cpp) (in the SVN directory trunk/examples). Have you seen them? If so, what is missing in your opinion? Thanks in advance! :)
Title: Explosions
Post by: Lo-X on August 30, 2011, 12:27:32 am
Personally, I use a selfmade particle system mixed with a flashlight, made with a simple white spheric image that I show a very short time.

You can add particles fire just after the explosion on nearest objects/tile/... but it's more complicated :D

For the flash light, look at : http://www.sfml-dev.org/forum/viewtopic.php?t=5183&highlight=
Title: Explosions
Post by: N1ghtly on August 30, 2011, 10:14:30 am
@Nexus: Wowie I totally missed you website xD
The documentation is very good, I'm sorry!

I'll try to get it working tonight :)

PS: belg of nl?
Title: Explosions
Post by: Haikarainen on August 30, 2011, 10:33:17 am
There is a working example of Thors particlesystem you should check out, was able to make really neat stuff after just 1 hour or so playing around with it!

This + fragmentshaders = success
Title: Explosions
Post by: N1ghtly on August 30, 2011, 11:02:29 am
where can I find it?

EDIT: nvm
Title: Explosions
Post by: N1ghtly on August 30, 2011, 11:24:05 am
I downloaded the lib, built it but now I can't get it to work.
These are the errors I get with the example:

Code: [Select]
F:\Dev\main.cpp||In function 'int main()':|
F:\Dev\main.cpp|18|error: 'ZonePtr' is not a member of 'thor::Emitter'|
F:\Dev\main.cpp|18|error: expected ';' before 'zone'|
F:\Dev\main.cpp|21|error: 'zone' was not declared in this scope|
F:\Dev\main.cpp|64|error: 'sf::Keyboard' has not been declared|
F:\Dev\main.cpp|56|warning: enumeration value 'Resized' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'LostFocus' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'GainedFocus' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'TextEntered' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'KeyReleased' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'MouseButtonReleased' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'MouseMoved' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'MouseEntered' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'MouseLeft' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'JoyButtonPressed' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'JoyButtonReleased' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'JoyMoved' not handled in switch|
F:\Dev\main.cpp|56|warning: enumeration value 'Count' not handled in switch|
F:\Dev\main.cpp|83|error: 'Vector2u' is not a member of 'sf'|
F:\Dev\main.cpp|83|error: expected ';' before 'mousePos'|
F:\Dev\main.cpp|84|error: 'mousePos' was not declared in this scope|
||=== Build finished: 7 errors, 13 warnings ===|
Title: Explosions
Post by: Nexus on August 30, 2011, 11:33:03 am
Download the latest SFML 2 Git revision and the latest Thor SVN revision, you probably use outdated versions. Then read the tutorial that explains how to install it with CMake :)
Title: Explosions
Post by: N1ghtly on August 30, 2011, 04:10:18 pm
So I should take the 1.1 version right?
Title: Explosions
Post by: Nexus on August 30, 2011, 05:05:27 pm
Yes. Although it's not really 1.1, rather the development version. Version 1.1 has not been released yet.
Title: Explosions
Post by: N1ghtly on August 30, 2011, 05:24:22 pm
Hey, I got it all up and running now! :D
I tried the example and it worked :)
But now, how should I created a somewhat realistic explosion effect?
English is not my native language, so waht does a "particle system" actually do?

thanks for the help so far :)