Tactile - a nice, straightforward 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: Tactile - a nice, straightforward input library!

Post by Tesselode » Mon Jul 27, 2015 4:54 am

I should probably mention a rewrite of Tactile I released recently. The library has been simplified in general; now all detectors are just functions, which makes it easy to write your own. So yeah, that's cool!

User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Tactile - a nice, straightforward input library!

Post by airstruck » Mon Jul 27, 2015 8:17 am

Tesselode wrote:now all detectors are just functions
Heh, sounds familiar ;)

Seriously though, good job on this rewrite. I like the new simplified API and the code looks great. I might have to find an excuse to use this soon.

User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Tactile - a nice, straightforward input library!

Post by Tesselode » Mon Jul 27, 2015 8:38 pm

time thief wrote:
Tesselode wrote:now all detectors are just functions
Heh, sounds familiar ;)

Seriously though, good job on this rewrite. I like the new simplified API and the code looks great. I might have to find an excuse to use this soon.
Yeah, at first I doubted you, but then I came around. :P

User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Tactile - a nice, straightforward input library!

Post by Tesselode » Thu Sep 10, 2015 2:24 am

Version 1.1 is out!

Changes:
  • Axes now have individual deadzones which you can set using the variable axis.deadzone. The global property tactile.deadzone has been removed. Axes have a default deadzone of 50%.
  • Detectors that use the joysticks now refresh the list of joysticks whenever they run. tactile.rescan has been removed, as it is no longer needed.
  • With the above two changes, tactile no longer has any global state. I'll take kikito's word for it that that's a good thing. :P
  • Axes and buttons now iterate through their detectors using a standard for loop instead of pairs, so performance should be better and the order detectors are checked in should be more predictable.
  • Added some simple error checking.

User avatar
alberto_lara
Party member
Posts: 347
Joined: Wed Oct 30, 2013 8:59 pm

Re: Tactile - a nice, straightforward input library!

Post by alberto_lara » Thu Sep 10, 2015 2:23 pm

Nice work, I'll take a look.

User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Tactile - a nice, straightforward input library!

Post by Tesselode » Thu Oct 29, 2015 3:14 am

Version 1.2 is out! This is a small update. You can now pass a deadzone to Axis:getValue(), and it will use that deadzone instead of the axis' deadzone property. This is good if you want to disable the deadzone and do your own deadzone handling or something/

User avatar
D0NM
Party member
Posts: 235
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: Tactile - a nice, straightforward input library!

Post by D0NM » Wed Feb 24, 2016 6:17 am

Nice lib, but it doesn't work with 0.10.1 LOVE2D

fix main.lua @line 128:

Code: Select all

mouseLeft = tactile.mouseButton(1)
Also, with your sample main.lua
I can see UP + DOWN + RIGHT and LEFT + DOWN + RIGHT keys combination.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Tactile - a nice, straightforward input library!

Post by Tesselode » Thu Feb 25, 2016 4:58 am

D0NM wrote:Nice lib, but it doesn't work with 0.10.1 LOVE2D

fix main.lua @line 128:

Code: Select all

mouseLeft = tactile.mouseButton(1)
Also, with your sample main.lua
I can see UP + DOWN + RIGHT and LEFT + DOWN + RIGHT keys combination.
There's no reason why up + down and left + right shouldn't work; they're separate buttons. Now with axes, they would cancel each other out. Also, up + down + left + right should all work at once, but it's common to only be able to push 3 arrow keys at once because most keyboards have certain combinations of keys they won't process all at once.

Anyway, I'm gonna work on a fix for main.lua now, it should take like 5 minutes. Nice catch!

User avatar
D0NM
Party member
Posts: 235
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: Tactile - a nice, straightforward input library!

Post by D0NM » Fri Feb 26, 2016 7:06 am

I'm choosing an input lib still...

I need an abstraction level to RECORD / PLAYBACK some cut-scenes and such.
Also I need some BOOBS.lua like key-combo-binding stuff..

With some decorator pattern it could be implemented with Tactile.
I used to make everything from scratch all the time.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Tactile - a nice, straightforward input library!

Post by Tesselode » Sat Feb 27, 2016 3:20 am

I would have a class/file somewhere that checks and records the input. It doesn't even have to interfere with your gameplay code, you can just access all your controls from wherever you want.

Post Reply

Who is online

Users browsing this forum: noahnadai and 10 guests