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

Author Topic: Thor 2.0 released!  (Read 385475 times)

0 Members and 1 Guest are viewing this topic.

fstream

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Thor 2.0
« Reply #195 on: May 06, 2013, 07:16:26 pm »
Thanks, this is exactly what I mean :D
Also this is very wrong as well:

int main()
{
____foo();
____
____return 0;
}


One proof of wrongness:

$ cat <<FOO > demo.c
> int main()
> {
>     foo();
>     
>     return 0;
> }
> FOO
$ git init
Initialized empty Git repository in /tmp/test/.git/
$ git add .
$ git diff --check --cached
demo.c:4: trailing whitespace.
+████


However, fixing it is very easy ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Thor 2.0
« Reply #196 on: May 06, 2013, 07:21:33 pm »
Quote
However, fixing it is very easy
All the corrected files were edited on OS X, not my fault :P
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thor 2.0
« Reply #197 on: May 06, 2013, 07:27:58 pm »
Don't flood the Thor thread with the space/tab discussion, I won't change my style anyway :P
Please split the posts to another thread if you want to continue that discussion.

(The specific case in examples/Particles.cpp was fixed though).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Thor 2.0
« Reply #198 on: May 06, 2013, 07:35:57 pm »
Sorry :-X
Laurent Gomila - SFML developer

Verra

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Thor 2.0
« Reply #199 on: May 09, 2013, 05:54:23 am »
Hello, I've recently built and setup thor and I've finally gotten around to trying to test it out. I started out with particles which seemed interesting . . . and that's where my fun ended. :<

Anyways I feel like I'm missing something blatantly obvious or I just have a setup that's incompatible with thor.
With this code:
#include <Thor/Particles.hpp>
#include <Thor/Animation.hpp>
#include <Thor/Vectors/PolarVector.hpp>
#include <Thor/Math/Distributions.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
        sf::RenderWindow win(sf::VideoMode(400, 300), "Thor test", sf::Style::Close);
        sf::Event event;

        sf::Texture smoke;
        smoke.loadFromFile("smokeparticle.png");

        thor::ParticleSystem smokeSystem(smoke);
        sf::Clock smokeSystemClock;

        thor::UniversalEmitter::Ptr smokeEmitter = thor::UniversalEmitter::create();
        smokeEmitter->setEmissionRate(15.0f);
        smokeEmitter->setParticleLifetime(thor::Distribution<sf::Time>(sf::seconds(5)));
        smokeSystem.addEmitter(smokeEmitter);

        smokeSystemClock.restart();
        while(win.isOpen())
        {
                while(win.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed)
                        {
                                win.close();
                                return 0;

                        }

                }

                smokeSystem.update(smokeSystemClock.restart());

                win.clear(sf::Color(255, 255, 255));
                win.draw(smokeSystem);
                win.display();

        }

}
 

Errors:
Line 20: Method 'setEmissionRate' could not be resolved
Line 21: Method 'setParticleLifetime' could not be resolved
Line 22: Invalid arguments ' Candidates are: void addEmitter(?) void addEmitter(?, sf::Time) '

I've also tried the example code for particles found on github, with the same errors, everywhere that 'emitter->' and '.addEmitter' are used. I am able to compile the above project with thor if I exclude the emitter code and keep the ParticleSystem it builds and runs properly.

I've setup the compiler flag for c++11 I've tested using shared_ptr separate from the above code with success. I'm using MinGW, gcc 4.7.2 with Eclipse CDT

I hope you have some idea of what's wrong and where I was a derp. Thanks for the help in advanced.

EDIT:

I fixed the issues with functions of UniversalEmitter being unresolved by casting the shared_ptr before using it. like this:
        ((thor::UniversalEmitter)*smokeEmitter).setEmissionRate(15.0f);
        ((thor::UniversalEmitter)*smokeEmitter).setParticleLifetime(thor::Distribution<sf::Time>(sf::seconds(5)));
 

The issues with adding the emitter to the particle system still remain however.

EDIT: EDIT:
I believe I found where I was being a derp all a long. ;) I should have checked the time stamps on the .exe. It was building just the eclipse indexer was saying that there were issues that would stop it from compiling. That still remains a problem so if you know how to fix that, that would be much appreciated.
« Last Edit: May 09, 2013, 07:18:44 am by Verrazano »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thor 2.0
« Reply #200 on: May 09, 2013, 10:51:11 am »
The latest Thor revision on g++ compiles fine (tested with MinGW), unfortunately I am not experienced with Eclipse for C++. The indexer problem seems to be a known one, I found this thread for example. If you search, you'll certainly find more...

By the way, I hope you're aware that your cast is no real fix -- the two "fixed" statements have no effect.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Thor 2.0
« Reply #201 on: June 10, 2013, 11:31:39 pm »
Hey Nexus, I have a problem that might be a bug in Thor 2.0. When using thor::Action::PressOnce for sf::Keyboard inputs, it performs identical actions to thor::Action::Hold. I can post some code if needed.
Current Projects:
Technoport

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thor 2.0
« Reply #202 on: June 11, 2013, 12:00:17 am »
I assume you use the latest Thor revision from GitHub. Is SFML key repeat disabled?

If so, a code would be nice. Please keep it minimal, so that I can directly copy and test if necessary.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Thor 2.0
« Reply #203 on: June 11, 2013, 12:18:50 am »
I solved it shortly after I posted, it was due to the key repeat being on. Thanks anyways.
Current Projects:
Technoport

NaCl

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Thor 2.0
« Reply #204 on: June 18, 2013, 10:25:30 pm »
Hi!
I bet I can find a solving for my problem here, but I wasnt able to so I have to ask here, sry.
I get lots of linking errors, it collides with MSVCP100D.dll and of course with MSVCP100.dll, too.
Linker settings: sfml-main-d.lib;sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-audio-s-d.lib;sfml-system-s-d.lib;thor-s-d.lib;%(AdditionalDependencies)
Which options do I have to fix this? I have no clue, except unlinking MSVCP100 but I dunno how to do this on a good way. And I dont know if it would be "allowed", too.

Thanks,
Salt

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thor 2.0
« Reply #205 on: June 18, 2013, 10:34:19 pm »
What does "it collides" mean? Have you followed the installation tutorial step by step?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

NaCl

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Thor 2.0
« Reply #206 on: June 18, 2013, 10:47:47 pm »
Just that they have problems. xd
Yes I followed the tutorial step by step.
Maybe I should reinstall VS?

Salt

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thor 2.0
« Reply #207 on: June 18, 2013, 11:10:04 pm »
Just that they have problems.
Would you mind telling which ones? ;)

That is, show the error message. Can you also tell me what your CMake settings are? I.e. the values of all the variables and checkboxes you see in the screenshot on the homepage.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

NaCl

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Thor 2.0
« Reply #208 on: June 18, 2013, 11:41:26 pm »
Ofc, excuse me.
The error-messages: http://pastebin.com/tUMeJyBE
My Cmake-Settings are...
CMAKE_BUILD_TYPE           set to Release
CMAKE_INSTALL_PREFIX     set to specific Path
SFML_INCLUDE_DIR            set to [Path to SFML]/include
SFML_ROOT                      set to [Path to SFML]
THOR_BUILD_DOC             set to Unchecked
THOR_BUILD_EXAMPLES    set to Unchecked       //First I checked this, but they didnt compile, same MSVCP100.dll errors
THOR_SHARED_LIBS         set to Unchecked
THOR_STATIC_STD_LIBS  set to Unchecked

Thanks,
Salt

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thor 2.0
« Reply #209 on: June 19, 2013, 07:30:27 am »
The preprocessor macro SFML_STATIC is defined? And you are in debug mode?

It looks like you are linking the CRT twice. The option should be /MDd (multithreaded DLL debug) for SFML, Thor and your project. I would try to rebuild Thor with a completely clean CMake configuration, and create a new empty VS project that uses it.

You might also consider rebuilding SFML, especially if you used different CMake flags to compile it (most notably SFML_USE_STATIC_STD_LIBS).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything