Baton - yet another input library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Baton - yet another input library

Post by Tesselode »

HattyDamp wrote: Tue Feb 14, 2017 3:37 pm Hi...i am a new user here. I want to know What is the idea behind _getActiveDevice? Is it used to avoid source queries for a device that isn't used?This one can be difficult to fix given the approach taken by the library but the shape of the deadzone should really be a circle, not a "cross".
_getActiveDevice is mainly for cosmetic things: for example, if you're showing on-screen instructions for the controls, you may want to change those instructions based on whether the player is using the joystick or the keyboard.

And circle deadzones is a topic I've thought about, but I haven't been very active in developing my libraries for the past few months. There are some times when you want cross deadzones and some times when you want circle dead zones. I'm considering adding a special kind of object to pair axes together and use a circular deadzone. Does that sound like something you would want?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Baton - yet another input library

Post by bartbes »

HattyDamp wrote: Tue Feb 14, 2017 3:37 pm Hi...i am a new user here. I want to know What is the idea behind _getActiveDevice? Is it used to avoid source queries for a device that isn't used?This one can be difficult to fix given the approach taken by the library but the shape of the deadzone should really be a circle, not a "cross".
As zorg pointed out, it looks like that was a bot. Oops!
pevzi wrote: Sat Oct 15, 2016 9:58 am 1. What is the idea behind _getActiveDevice? Is it used to avoid source queries for a device that isn't used?
2. This one can be difficult to fix given the approach taken by the library but the shape of the deadzone should really be a circle, not a "cross". Tactile suffered from this as well, by the way.
User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Baton - yet another input library

Post by Tesselode »

bartbes wrote: Tue Feb 14, 2017 5:37 pm
HattyDamp wrote: Tue Feb 14, 2017 3:37 pm Hi...i am a new user here. I want to know What is the idea behind _getActiveDevice? Is it used to avoid source queries for a device that isn't used?This one can be difficult to fix given the approach taken by the library but the shape of the deadzone should really be a circle, not a "cross".
As zorg pointed out, it looks like that was a bot. Oops!
pevzi wrote: Sat Oct 15, 2016 9:58 am 1. What is the idea behind _getActiveDevice? Is it used to avoid source queries for a device that isn't used?
2. This one can be difficult to fix given the approach taken by the library but the shape of the deadzone should really be a circle, not a "cross". Tactile suffered from this as well, by the way.
ah geez now i look like a silly
lizenas
Prole
Posts: 4
Joined: Mon Apr 17, 2017 3:40 pm

Re: Baton - yet another input library

Post by lizenas »

The documentation for getActiveInputDevice() makes it sound like you can't have more than one input device controlling the game, which would make any kind of co-op game impossible. Is this true or am i misreading it?
User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Baton - yet another input library

Post by Tesselode »

lizenas wrote: Wed Apr 19, 2017 4:17 pm The documentation for getActiveInputDevice() makes it sound like you can't have more than one input device controlling the game, which would make any kind of co-op game impossible. Is this true or am i misreading it?
Nope! player:getActiveDevice() is per player object, and to have multiple players you would use multiple player objects. So you can definitely make co-op games!
lizenas
Prole
Posts: 4
Joined: Mon Apr 17, 2017 3:40 pm

Re: Baton - yet another input library

Post by lizenas »

Oh, gotcha. Thanks!
User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Baton - yet another input library

Post by Tesselode »

I just pushed a pretty major update with support for axis pairs. I've tested it a decent amount, but let me know if you all find any bugs! fingers crossed that there won't be any glaring horrible ones
lizenas
Prole
Posts: 4
Joined: Mon Apr 17, 2017 3:40 pm

Re: Baton - yet another input library

Post by lizenas »

Looks great! Super excited to use this, it'll simplify a decent chunk of my movement code
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests