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: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: TLbind - making professional control schemes easy

Post by Taehl »

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: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: TLbind - making professional control schemes easy

Post by Taehl »

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 »

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 »

hate to bump, but it has been over a week and this is driving me crazy
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

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

Post by raidho36 »

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 »

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_ »

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.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

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

Post by togFox »

I apologise for the necro-bump but this TLbind is on the official wiki and the download (drop box is no longer available) so I'd like to know how to best archive the wiki page, or update the wiki page if a github is known

+

are there other keybind libraries ppl can recommend for my own project?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests