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

Author Topic: Comparison SFML vs SDL -> GUI and OGRE3D  (Read 16535 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #15 on: September 19, 2012, 12:07:31 am »
I know SFML don't support the IOS(iPhone OS). So i thought to use the OIS(Object Oriented Input System) for IOS Touch.
It's iOS and not IOS, that's what got me confused... ;)

But i read in other posts, that laurent is planning for -> "3.0 +" IOS support. It would be nice, but we cannot be sure ;)
Well if you plan on waiting 10 years or so... ;D

What eXpl0it3r probably meant is that these three classes may already know be independent of a window.
Yes! :)
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

FRex

  • Hero Member
  • *****
  • Posts: 1843
    • View Profile
    • My GitHub Page
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #16 on: September 19, 2012, 12:28:45 am »
Quote
SFML is under the MIT license so feel free to do whatever you want.
No it's not:
Quote
SFML libraries
(...)
Source code is provided under the terms of the zlib/png license
But that's even more permissive.
ZipSavings, script to count rar/7z/zip savings: https://goo.gl/vvBj5M
LuaConsole: https://goo.gl/X4kRUk
FoxRaycaster: https://goo.gl/27nVS8
Small Games - Heart, Routing and Snek: https://goo.gl/15ZGWE https://goo.gl/k5gwWD https://goo.gl/4nKPnT
Botes - a notes app in Pascal: https://goo.gl/bzTqsi

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #17 on: September 19, 2012, 12:32:07 am »
I try to figure out the sense from your answers.

Quote
Well if you plan on waiting 10 years or so...
So you think there will be no changes and i shouldn't use SFML for Input?

Quote
What eXpl0it3r probably meant is that these three classes may already know be independent of a window.
So the Input System can be easily separated-> so  use SFML? Separate it by myself and don't wait for changes ...

Or do you agree with me? -> Use SFML for Keyboard, Mouse, Joystick and others for iOS

 ???

Maybe you know this guy ;)
http://www.wreckedgames.com/forum/index.php/topic,5598.0.html
« Last Edit: September 19, 2012, 12:40:05 am by noobie »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #18 on: September 19, 2012, 12:57:30 am »
Quote
SFML is under the MIT license so feel free to do whatever you want.
No it's not:
Right, I always confuse them since they are quite similar. ;)

So you think there will be no changes and i shouldn't use SFML for Input?
If you look at the SFML 2 history which is over 2 years long, then you can guess that SFML 3 won't be out next month or so. 10y was obviously just a joke (at least I hope so).


Quote
So the Input System can be easily separated-> so  use SFML?
You still didn't get it: It's already seperated!
It's just within the window mosule but nobody forces you to use a window.

Quote
Separate it by myself and don't wait for changes ...

Or do you agree with me? -> Use SFML for Keyboard, Mouse, Joystick and others for iOS
Do whatever fits your needs, it really doesn't matter as long as you can work with it. ;)

Quote
Maybe you know this guy ;)
http://www.wreckedgames.com/forum/index.php/topic,5598.0.html
Never heard of him or OIS.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

N_K

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #19 on: September 19, 2012, 06:33:04 am »
I don't really get what's the problem with the input system. Although haven't tried it myself, I've seen people using SFML for rendering and using OIS for input handling. OIS is engine/framework independent, you can even use it with text-mode applications if you want.

But, think about it. SFML already has its own input system, designed and developed by the same developer who did the library itself, so unless you need to use some really special input device (PS2/PS3/XBox(360)/Wii controllers, steering wheels, etc.), don't make your life harder and just use the input system that comes with SFML.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32434
    • View Profile
    • SFML's website
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #20 on: September 19, 2012, 07:35:35 am »
Quote
SFML is under the MIT license
zlib license :-X
Laurent Gomila - SFML developer

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #21 on: September 19, 2012, 09:03:59 pm »
So, one evening later i looked at the input code :P

I just changed the lines in the mouse class with Window calls e.g.:

Vector2i InputImpl::getMousePosition(const Window& relativeTo)
{
    WindowHandle handle = relativeTo.getSystemHandle();

to

Vector2i InputImpl::getMousePosition(const WindowHandle relativeTo)
{

so far it seems to work  ;D

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #22 on: September 22, 2012, 02:51:49 pm »
Me again! :)

I still don't get it! Where is the Input System separated from the Window?

I removed all Window classes, picked out the Input methods and made one EventListener class to store the Events per Window (e.g. Ogre -> the RenderWindow), see attachement.

The Window events,Mouse and Keyboard seems to work per Frame and buffered now.
Just have to love the SFML code!

Still don't have a Joystick, but as i see it doesn't need a Window Handle or something?
The Joystick States are updated in the pollEvent loop (per Frame?)?



[attachment deleted by admin]
« Last Edit: September 22, 2012, 02:55:06 pm by noobie »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #23 on: September 22, 2012, 03:03:06 pm »
I still don't get it! Where is the Input System separated from the Window?
Yeah we still don't get what you don't get either...
sf::Keyboard, sf::Mouse and sf::Joystick are classes that are not directly connected to sf::Window or sf::RenderWindow, but of course they get compiled into the same library as sf::Window and sf::Event etc.
The functions themself though aren't connected to the window class, you can just take the functions (SFML/src/Window/<OS>/InputImpl.cpp & SFML/src/Window/<OS>/InputImpl.hpp) and plug them into your own stuff without having to write-out hundreds of SMFL code parts you don't need.
Thus the input system (sf::Keyboard, sf::Mouse and sf::Joystick) is separated from the window itself (sf::Window).
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #24 on: September 22, 2012, 03:19:30 pm »
see it as a request or improvement suggestion for the current window system if users just want the input system. 
As far as i can see the pollEvent cannot be used without the window Object.

But so far i can live with it (Did it by myself and got it to work with Ogre). :-X

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6226
  • Thor Developer
    • View Profile
    • Bromeon
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #25 on: September 22, 2012, 03:34:39 pm »
see it as a request or improvement suggestion for the current window system if users just want the input system.
See what as request? Sorry, I don't exactly see your problem, either.
 
As far as i can see the pollEvent cannot be used without the window Object.
Yes, and as I already mentioned, it doesn't make sense without a window object, since the events are connected to the window. For example, a Closed event fires when the window is closed, MouseMoved event triggers when the mouse is moved in the window, etc.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: first SFML book

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #26 on: September 22, 2012, 03:41:16 pm »
grrr

I feel like a stupid little piece of scum now.  :'(

My Problem?
- I searched for a good input System for Ogre
- Didnt find a solution to use SFML for Ogre

And now i got it to work with much changes ....

So jesus, what can u not understand what my problem is/was ? :P

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #27 on: September 22, 2012, 03:50:51 pm »
Events are something totally different than just plain input stuff and we've many times stated that events can only be used with a window.

If you're requesting to split the sf::Keyboard, sf::Mouse and sf::Joystick into their own small 'input' library or similar, than this is 'okay', although I don't think this should be done to SFML... ;)
If you want a separated library that can handle events, then this is simply not possible, since as Nexus already stated just now and earlier, events are connected to a window.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #28 on: September 22, 2012, 03:55:32 pm »
if there's no way i have to accept it , but i don't want to believe it  ;D

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32434
    • View Profile
    • SFML's website
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #29 on: September 22, 2012, 04:07:34 pm »
No way to what? To know if a window is closed, without a window? To know if a key is pressed in a window, without a window? To know if a window gains/loses focus, without a window? ...

You see, all events are connected to a window, there's no event that could make sense without one.

So what exactly would you like to be able to do? Say it clearly (be more precise than "input system") and let's end this endless discussion :P
Laurent Gomila - SFML developer

 

anything