Common Organization of Controls Kit (1.3 update)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
raidho36
Party member
Posts: 1927
Joined: Mon Jun 17, 2013 12:00 pm

Common Organization of Controls Kit (1.3 update)

Post by raidho36 » Mon Jul 29, 2013 7:34 pm

Version 1.3 is now ready to use.

What it is:
Basically, it's a TLbind successor.

What it does:
Enables you to easily define a (several of) set of controls to be used in your game, and provides a very user-friendly methods for handling it, specifically you can access all gathered data as a table member, and it has a function to grab a user input to store it into control map, and to unset it, which is really handy in controls setup screen etc.

I have attached an example of controls setup menu screen, since it's the place where you have broadest view on what this kit is capable of.

Wiki page: Common Organization of Controls Kit
Project page: http://raidho36.net/stuff/cock
Attachments
datafile.love
1.3 demo
(221.82 KiB) Downloaded 1382 times
Last edited by raidho36 on Mon Sep 02, 2013 7:05 pm, edited 5 times in total.

User avatar
Roland_Yonaba
Inner party member
Posts: 1562
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Common Organization of Controls Kit (1.1 update)

Post by Roland_Yonaba » Thu Aug 01, 2013 11:30 am

A kinky name again...

User avatar
qaisjp
Party member
Posts: 489
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Common Organization of Controls Kit (1.1 update)

Post by qaisjp » Sun Aug 04, 2013 1:27 am

Interesting, can you list what features you have (and if you dare, what features you dont have compared to TLBind)
Lua is not an acronym.

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

Re: Common Organization of Controls Kit (1.1 update)

Post by raidho36 » Sun Aug 04, 2013 4:39 am

Features list of 1.1 is on the wiki page, the copypaste of it:
Create one or several control objects, with each of them having their own controls set
Define, extend and access sets of control bindings easily
Utilize all input devices and all their abilities supported by LÖVE
Capture user input device and value and automatically bind it; bind a device and key manually
Optionally block input callbacks and update function during input capture, to ensure safe capture
Unbind controls easily
Set mouse offset and output values scaling factor; ignore mouse motion during input capture
Delta-axis mode for all axis-like devices
Reload (re-pickup) previously used joysticks
4 psychoanatomic adjustments for joystick hat lateral input, separate option for allowing diagonal input
Literal arguments for enum-accepting functions, along with numbers
"Control Mode" virtual variable (have no actual effect, a convenience feature)
(now that I think of it, I forgot to add "define and use default controls configurations easily")
1.2 added multiple binds per action, joystick button-to-hat mapping, list joysticks by name, joystick axis deadzones, direct and inverted delta-mode for all types of binded input devices, also input inversion for them, default configuration for XBox360 controller for all OSes.

As of 1.2, missing features are: multiple joysticks simultaneously, callbacks, thumbsticks "normalizaiton" and joystick trackballs. That's it. Joysticks and callbacks are scheduled for 1.3. There won't be thumb normalization (this won't work well with some joysticks and is not how you resolve "move diagonally faster" anyway) and trackballs support (this feature of LÖVE is dropped since 0.9.0).

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

Re: Common Organization of Controls Kit (1.2 update)

Post by raidho36 » Sat Aug 17, 2013 12:40 am

Updated to 1.2.

Testing of setDefaultXBox360 under Linux and OS X would be appreciated.

User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: Common Organization of Controls Kit (1.2 update)

Post by substitute541 » Sun Aug 18, 2013 4:19 am

Nice library ya got there!

A few thousand miles away, someone is gonna name their library "Animation Starter Helper".
If you think that does not sound like anything, say it irl.
Currently designing themes for WordPress.

Sometimes lurks around the forum.

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

Re: Common Organization of Controls Kit (1.3 update)

Post by raidho36 » Mon Sep 02, 2013 7:06 pm

Updated to version 1.3. Now it actually IS a TLbind successor.

Added a bunch of features, fixed a bunch of bugs.

Complete manual added! See the wiki page.

Uploaded old demo patched to run with 1.3 library.

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Common Organization of Controls Kit (1.3 update)

Post by Jasoco » Tue Sep 03, 2013 6:48 pm

Crashes for me on OS X with a different error for 8 and 9.

On 8: cock.lua: 783: attempt to index field '?' (a nil value)

On 9: cock.lua: 459: attempt to call upvalue 'lj_getNumJoysticks' (a nil value)

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

Re: Common Organization of Controls Kit (1.3 update)

Post by raidho36 » Tue Sep 03, 2013 7:11 pm

Thanks for the input.
Jasoco wrote:Crashes for me on OS X with a different error for 8 and 9.

On 8: cock.lua: 783: attempt to index field '?' (a nil value)

On 9: cock.lua: 459: attempt to call upvalue 'lj_getNumJoysticks' (a nil value)
Are you using LuaJIT by any chance? These operations are not related to the OS X and are confirmed to work with vanilla LÖVE on Linux and Windows, and there's no reason why lj_getNumJoysticks should've been an upvalue, let alone an undefined upvalue.

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Common Organization of Controls Kit (1.3 update)

Post by Jasoco » Tue Sep 03, 2013 7:16 pm

raidho36 wrote:Thanks for the input. Are you using LuaJIT by any chance? These operations are not related to the OS X and are confirmed to work with vanilla LÖVE on Linux and Windows, and there's no reason why lj_getNumJoysticks should've been an upvalue, let alone an undefined upvalue.
Yeah. They're both LuaJIT. (I'm on Mavericks which breaks all versions of Löve that are stock out of the box, so I have specially compiled versions of 8 and 9 with JIT since I can't use the normal ones from the website itself.)

Post Reply

Who is online

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