Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Explosions  (Read 4253 times)

0 Members and 1 Guest are viewing this topic.

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Explosions
« 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?

Jove

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • http://www.jestofevekites.com/
Explosions
« Reply #1 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.
{much better code}

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Explosions
« Reply #2 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, there is a tutorial about the particle system, an API documentation and a complete example (in the SVN directory trunk/examples). Have you seen them? If so, what is missing in your opinion? Thanks in advance! :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Explosions
« Reply #3 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=

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Explosions
« Reply #4 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?

Haikarainen

  • Guest
Explosions
« Reply #5 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

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Explosions
« Reply #6 on: August 30, 2011, 11:02:29 am »
where can I find it?

EDIT: nvm

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Explosions
« Reply #7 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 ===|

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Explosions
« Reply #8 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 :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Explosions
« Reply #9 on: August 30, 2011, 04:10:18 pm »
So I should take the 1.1 version right?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Explosions
« Reply #10 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Explosions
« Reply #11 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 :)

 

anything