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

Author Topic: Is there a better way of handling the keybinds than the SFML game dev book?  (Read 2590 times)

0 Members and 1 Guest are viewing this topic.

devilswin

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
It feels to me that the key bind system the have in the book  (when i click up, move the plane up) seems very unresponsive at times, or too sensitive at times. Like if i hold down left for 2-3 seconds, release left then hold down right, the plane wont move. is there a better way of doing this?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Is there a better way of handling the keybinds than the SFML game dev book?
« Reply #1 on: September 12, 2015, 08:02:50 pm »
This sounds more like an issue somewhere else in the code.

Alternatively you can take a look at Thor's implementation.
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: Is there a better way of handling the keybinds than the SFML game dev book?
« Reply #2 on: September 13, 2015, 12:44:47 am »
The code is the exact same as in the book

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Is there a better way of handling the keybinds than the SFML game dev book?
« Reply #3 on: September 13, 2015, 08:34:45 am »
Which is?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Is there a better way of handling the keybinds than the SFML game dev book?
« Reply #4 on: September 13, 2015, 06:11:58 pm »
I don't see how the key binding (i.e. mapping an action to a key) is related to responsiveness. Can you be more concrete?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything