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

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

0 Members and 4 Guests are viewing this topic.

Mars_999

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Email
Re: Thor 2.0
« Reply #375 on: August 30, 2014, 12:51:15 am »
Not trying to be rude and get off my back about etiquette, I know all about it, I have been watching SFML since before 1.6 even and been watching Thor since before 2.0 was coming and was pumped about the possibilities, I just not getting any younger and with my health failing I would like to make something before I get worse...

Anyway I am not getting into some debate about this crap so don't expect me to reply to anymore comments about these postings.

And yes Nexus thanks A MILLION for the great lib. Just got it working and built it from Cmake builds. Finally your lib and current state of SFML are so much better to work with then others projects in the past when I was trying out SFML what a nightmare, Cmake builds had errors stuff wouldn't compile. So again thank you very much and if I lived by you I would buy you a few beers! :)


tyrion

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Thor 2.0
« Reply #376 on: September 11, 2014, 11:27:01 pm »
Back to my previous problem :)
PressOnce and ReleaseOnce denote events (they happen once), while Hold is a real-time state (a state you can query).

Maybe the functions thor::eventAction() and thor::realtimeAction() are interesting for you.

maybe u are interrested in how i solved my problem. If not sry for this post.

it was much easier than i thought to handle the "realtime actions".
After some debugging i found this line in sfml: 
return (GetAsyncKeyState(vkey) & 0x8000) != 0;

i always thought i need a window handle for key events .... :(

Solution:
i have to send only the "GainedFocus" event to activate realtime actions and "LostFocus" to deactivate realtime actions ....
no manual sending of events (because it works without setting a window handle)!


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Thor 2.0
« Reply #377 on: January 16, 2015, 01:16:53 am »
Just noticed while building the Nightly Builds that the import libraries get the ".dll.a" suffix, is this intentional or some issue with CMake?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Thor 2.0
« Reply #378 on: January 16, 2015, 07:43:55 am »
".dll.a" is the default extension if you don't explicitly change it.
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Thor 2.0
« Reply #379 on: January 16, 2015, 09:20:52 am »
I'm aware, question is, should it use that extension given that static libs get differentiated with the -s suffix. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

devilswin

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: Thor 2.0
« Reply #380 on: March 03, 2015, 06:26:40 pm »
Hello, Im on mac and i have SFML working but wen i try to make the build of thor, i get errors for the build, CMAKE can run fine but the issue comes with making it

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Thor 2.0
« Reply #381 on: March 03, 2015, 06:35:28 pm »
Maybe you should post the errors you get if you want people to be able to help you...

devilswin

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: Thor 2.0
« Reply #382 on: March 03, 2015, 06:48:38 pm »
/Users/****/Downloads/Thor-master/src/Particle.cpp:62:38: error:
      invalid operands to binary expression ('sf::Time' and 'sf::Time')
        return getElapsedLifetime(particle) / getTotalLifetime(particle);
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/SFML.framework/Headers/System/Time.hpp:364:22: note:
      candidate function not viable: no known conversion from 'sf::Time' to
      'float' for 2nd argument
SFML_SYSTEM_API Time operator /(Time left, float right);
                     ^
/Library/Frameworks/SFML.framework/Headers/System/Time.hpp:376:22: note:
      candidate function not viable: no known conversion from 'sf::Time' to
      'Int64' (aka 'long long') for 2nd argument
SFML_SYSTEM_API Time operator /(Time left, Int64 right);
                     ^
/Library/Frameworks/SFML.framework/Headers/System/Vector2.inl:131:19: note:
      candidate template ignored: could not match 'Vector2<type-parameter-0-0>'
      against 'sf::Time'
inline Vector2<T> operator /(const Vector2<T>& left, T right)
                  ^
/Users/****/Downloads/Thor-master/src/Particle.cpp:67:40: error:
      invalid operands to binary expression ('sf::Time' and 'sf::Time')
        return getRemainingLifetime(particle) / getTotalLifetime(particle);
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/SFML.framework/Headers/System/Time.hpp:364:22: note:
      candidate function not viable: no known conversion from 'sf::Time' to
      'float' for 2nd argument
SFML_SYSTEM_API Time operator /(Time left, float right);
                     ^
/Library/Frameworks/SFML.framework/Headers/System/Time.hpp:376:22: note:
      candidate function not viable: no known conversion from 'sf::Time' to
      'Int64' (aka 'long long') for 2nd argument
SFML_SYSTEM_API Time operator /(Time left, Int64 right);
                     ^
/Library/Frameworks/SFML.framework/Headers/System/Vector2.inl:131:19: note:
      candidate template ignored: could not match 'Vector2<type-parameter-0-0>'
      against 'sf::Time'
inline Vector2<T> operator /(const Vector2<T>& left, T right)
                  ^
2 errors generated.
make[2]: *** [src/CMakeFiles/thor.dir/Particle.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/thor.dir/all] Error 2
make: *** [all] Error 2
****-MacBook-Pro-2:Build gabeorlanski$ cd
 

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Thor 2.0
« Reply #383 on: March 03, 2015, 06:49:28 pm »
Nobody can help you without knowing
 - the platform you're on
 - the compiler you use
 - the exact error messages you get
 - possibly your actual code
I recommend reading this: http://www.catb.org/esr/faqs/smart-questions.html

devilswin

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: Thor 2.0
« Reply #384 on: March 03, 2015, 06:53:00 pm »
1 this is Via mac terminal
2 Unix Makefiles
3 Clang is my compiler
4 The code is the build of THOR

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Thor 2.0
« Reply #385 on: March 03, 2015, 07:07:52 pm »
The important thing to know is your version of SFML. Most likely not SFML 2.2, which is the only version that has this operator.
« Last Edit: March 03, 2015, 07:09:28 pm by Laurent »
Laurent Gomila - SFML developer

devilswin

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: Thor 2.0
« Reply #386 on: March 03, 2015, 07:09:25 pm »
So i got it to build with Xcode by changing in particle.cpp lines 60-68


float getElapsedRatio(const Particle& particle)
{
        return getElapsedLifetime(particle) / getTotalLifetime(particle);
}

float getRemainingRatio(const Particle& particle)
{
        return getRemainingLifetime(particle) / getTotalLifetime(particle);
}
 


to

float getElapsedRatio(const Particle& particle)
{
        return getElapsedLifetime(particle).asMilliseconds() / getTotalLifetime(particle).asMilliseconds();
}

float getRemainingRatio(const Particle& particle)
{
        return getRemainingLifetime(particle).asMilliseconds() / getTotalLifetime(particle).asMilliseconds();
}
 


So yeah, i don't know if this is an unknown bug (Downloaded straight from github). But something doesn't feel right about doing this


The important thing to know is your version of SFML. Most likely not SFML 2.2, which is the only version that has this operator.

It is 2.1, the issue is that by downloading the clang release of 2.2, there is no cmake file, which makes it impossible to install (at least as far as i know)
« Last Edit: March 03, 2015, 07:18:41 pm by devilswin »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Thor 2.0
« Reply #387 on: March 03, 2015, 07:12:21 pm »
You're not using SFML 2.2 and thus you're missing the / operator for sf::Time.

As for using this forum: It's not a chat, so don't submit one after the other post, but use the edit function!
« Last Edit: March 03, 2015, 07:14:37 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

devilswin

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: Thor 2.0
« Reply #388 on: March 03, 2015, 07:17:27 pm »
Sorry for the spam...



But with the way the clang files for 2.2, there is no cmake lists so how would i install it...



There i removed my other comments
« Last Edit: March 03, 2015, 07:19:12 pm by devilswin »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Thor 2.0
« Reply #389 on: March 03, 2015, 07:54:30 pm »
The CMake files for compiling SFML are in the source code package.
Laurent Gomila - SFML developer