TLbind 1.3 - professional controls made easy (now w/ mouse!)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1024
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: TLbind - making professional control schemes easy

Post by Taehl » Wed Feb 20, 2013 8:36 am

During my year of being without Internet, I've upgraded TLbind! It features general improvements, a convenience TLbind.giveInstance function for making new control instances, and the main new feature is mouse support. Mouse buttons are handled as digital input and mouse position as an analogue input (-1 to 1 in screen space). Documentation and download links are the same, TLbind and link respectively.
MiniDemonic wrote:the "corner" problems was due to the TLbind.deadzone setting. Changed the deadzone to 0 and now it works good enough, although the aiming still got "corners" but they are barely noticeable.
I highly recommend you don't get rid of the deadzone, or else your game will likely have control drift on many gamepads. To get rid of "corners" (if I understand you), use bind.maps to make an analogue pair circular instead of square.
gfreak wrote:any plans to support multiple controls per button?
Nope.
gfreak wrote:and any plans to add left and right mouse button?
This update adds all mouse buttons (and wheel) as well as mouse position.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.

User avatar
Taehl
Dreaming in associative arrays
Posts: 1024
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: TLbind - making professional control schemes easy

Post by Taehl » Thu Apr 18, 2013 8:36 am

I've updated TLbind to 1.3, which replaces the old deadzone behavior with super-smooth scaled radial deadzones. This removes the "axis lock" problem, as well as the "0 to deadzone" jump. Since this also normalizes the input, binds.deadzoneAxes has replaced binds.circleAnalogue.

So this problem:
MiniDemonic wrote:the "corner" problems was due to the TLbind.deadzone setting. Changed the deadzone to 0 and now it works good enough, although the aiming still got "corners" but they are barely noticeable.
... is now fixed.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.

immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: TLbind 1.3 - professional controls made easy (now w/ mou

Post by immakinggames » Mon Jun 24, 2013 7:55 pm

Can anybody tell me why I can't change the deadzone of my 360 controller with this code?

Code: Select all

TLbind,control = love.filesystem.load("TLbind.lua")()

TLbind.deadzone = .3 --any number here changes nothing :(
	
	TLbind.joyHats[1] =  {{"left","right","up","down"}} 
	TLbind.joyAxes[1] =  {"Horizontal", "Vertical"} 
	
	TLbind.maps = {
                ["Horizontal"]  = {"left", "right"},
                ["Vertical"]    = {"up", "down"}
        }

	TLbind.deadzoneAxes = { {"Horizontal", "Vertical"} }

immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: TLbind 1.3 - professional controls made easy (now w/ mou

Post by immakinggames » Wed Jul 03, 2013 6:18 am

hate to bump, but it has been over a week and this is driving me crazy

User avatar
raidho36
Party member
Posts: 2031
Joined: Mon Jun 17, 2013 12:00 pm

Re: TLbind 1.3 - professional controls made easy (now w/ mou

Post by raidho36 » Mon Sep 02, 2013 9:02 pm

Shameless self-advertising in competitors' thread:

You can try the COCK library. It's a little harder to use, but works a charm.

http://love2d.org/forums/viewtopic.php?f=5&t=40089

Kyle
Party member
Posts: 146
Joined: Sat Mar 16, 2013 9:46 pm

Re: TLbind 1.3 - professional controls made easy (now w/ mou

Post by Kyle » Mon Sep 02, 2013 11:09 pm

raidho36 wrote:Shameless self-advertising in competitors' thread:

You can try the COCK library. It's a little harder to use, but works a charm.

http://love2d.org/forums/viewtopic.php?f=5&t=40089
raidho36, stop trying to make COCK happen. It's not going to happen.

bunny_
Prole
Posts: 1
Joined: Thu Sep 05, 2013 5:46 pm

Re: TLbind 1.3 - professional controls made easy (now w/ mou

Post by bunny_ » Thu Sep 05, 2013 6:04 pm

Hello, first of all thank you for making such an useful thing, it makes control stuff so simple :awesome:
I just wanted to point out a bug in the latest (1.3) version:

The controls are reset in line 62

Code: Select all

for k,v in pairs(control) do if type(v)~="table" then control[k] = false end end
But it used to clear only booleans in an older version I had

Code: Select all

for k,v in pairs(hold) do if type(v)=="boolean" then hold[k] = nil end end
So now it turns anything to 'false'! Including the controlPressed and controlReleased functions you're supposed to be able to assign. It's easy to fix, but I thought I should point it out.

Post Reply

Who is online

Users browsing this forum: No registered users and 177 guests