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

Author Topic: Just need support for controller, is SFML right for me?  (Read 1593 times)

0 Members and 1 Guest are viewing this topic.

herrerik

  • Newbie
  • *
  • Posts: 2
    • View Profile
Just need support for controller, is SFML right for me?
« on: September 11, 2017, 02:17:46 pm »
Hi
Im using a game engine that utilizes directx 8.0 and as input I can use mouse and keyboard fine. But I need support for controllers, preferably for two controllers at the same time (with analog sticks as well such as the xbox 360 controller).

I already have graphics, sound and everything up and running, would SFML be easy to use with my existing game engine? I just need the controller support.

Thanks!
Erik

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
Re: Just need support for controller, is SFML right for me?
« Reply #1 on: September 11, 2017, 02:20:24 pm »
Since you looked your game down to Windows anyways with DirectX, why not go for XInput?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

herrerik

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Just need support for controller, is SFML right for me?
« Reply #2 on: September 11, 2017, 02:32:28 pm »
That seem to be foused on the 360 controller specifically. I dont think it works with general windows-compatible controllers as well.
« Last Edit: September 11, 2017, 02:43:22 pm by herrerik »

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Just need support for controller, is SFML right for me?
« Reply #3 on: September 22, 2017, 08:24:47 pm »
For using a Dualshock 4 and making it pretend to be an XInput controller there is https://inputmapper.com/ and it's been working flawlessly for me. I can't comment about other kinds of controllers and multiple controllers though, I have just one myself. I also prefer a DS4 over XBone controller but the latter sadly seems to be the 'default' on Windows and it's assumed (by games like Final Fantasy, Zero Escape, Dark Souls, etc.) that you have a 360 or XBone or 'compatible' controller if you want to use controller in games on PC at all.
« Last Edit: September 22, 2017, 08:26:38 pm by FRex »
Back to C++ gamedev with SFML in May 2023

 

anything