Difference between revisions of "Common Organization of Controls Kit"

(Changelog)
(Features)
Line 9: Line 9:
 
== Features ==
 
== Features ==
 
* Create one or several control objects, with each of them having their own controls set
 
* Create one or several control objects, with each of them having their own controls set
* Define, extend and access sets of control bindings easily
+
* Define, extend and access sets of control bindings with ease
* Define and use default controls configurations easily
+
* Define and use default controls configurations
 +
* Set up XBox360 controller in one function call
 
* Utilize all input devices and all their abilities supported by LÖVE
 
* 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
+
* Capture user input device and value and automatically bind it; bind a device and key manually; call a callback when input is captured
 
* Optionally block input callbacks and update function during input capture, to ensure safe capture
 
* Optionally block input callbacks and update function during input capture, to ensure safe capture
* Unbind controls easily
+
* Unbind controls in easy way
 
* Set mouse offset and output values scaling factor; ignore mouse motion during input capture
 
* Set mouse offset and output values scaling factor; ignore mouse motion during input capture
* Delta-axis mode for all axis-like devices
+
* Set joystick axis deadzones
 +
* Map joystick buttons to joystick hats
 +
* Delta and inversion modes for all input devices, negative values cutoff
 
* Reload (re-pickup) previously used joysticks
 
* Reload (re-pickup) previously used joysticks
 
* 4 psychoanatomic adjustments for joystick hat lateral input, separate option for allowing diagonal input
 
* 4 psychoanatomic adjustments for joystick hat lateral input, separate option for allowing diagonal input
* Literal arguments for enum-accepting functions, along with numbers
+
* Literal arguments for enum-accepting functions, along with numbers; functions to convert literal to numerical values
 
* "Control Mode" virtual variable (have no actual effect, a convenience feature)
 
* "Control Mode" virtual variable (have no actual effect, a convenience feature)
  
This is a feature list of the latest version, which is 1.1
+
This is a feature list of the latest version, which is 1.2
  
 
== Links ==
 
== Links ==

Revision as of 23:49, 16 August 2013

Common Organization of Controls Kit is a tool for handling control over your LÖVE games.

It enables you to easily define a (several of) set of control bindings to be used in your game, and provides a very user-friendly methods for handling it, e.g. 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.

This library have much detail to it, please consutlt the manual.

NOTE: the library only support latest released version of LÖVE, and the author only support latest released version of the library. There may be no backwards compatibility.

Features

  • Create one or several control objects, with each of them having their own controls set
  • Define, extend and access sets of control bindings with ease
  • Define and use default controls configurations
  • Set up XBox360 controller in one function call
  • 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; call a callback when input is captured
  • Optionally block input callbacks and update function during input capture, to ensure safe capture
  • Unbind controls in easy way
  • Set mouse offset and output values scaling factor; ignore mouse motion during input capture
  • Set joystick axis deadzones
  • Map joystick buttons to joystick hats
  • Delta and inversion modes for all input devices, negative values cutoff
  • 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; functions to convert literal to numerical values
  • "Control Mode" virtual variable (have no actual effect, a convenience feature)

This is a feature list of the latest version, which is 1.2

Links

Changelog

  • 1.2:
    • fixed:
      • a bunch of potential pitfalls
      • joystick axes and hats are now correctly captured
    • added:
      • no-cutoff for negative values for inversion
      • multiple binds per action via "options" tables
      •  :setJoystickDeadzone and getJoystickDeadzone gets and sets joystick deadzone per axis
      •  :getJoysticksList returns list of all found joysticks names and numbers
      •  :remapJoystickHat maps four joystick buttons to act like joystick hat
      •  :bind directly binds mappings
      •  :getBinded returns list of binds for map
      •  :getEmptyOption returns next (in arbitrary order) unused option for map
      •  :getControlModesList returns list of all control modess
      •  :getConvertedDevice, :getConvertedAxis, :getConvertedInverse, :getConvertedDelta
      • cutoff delta modes and inversion modes (only pass positive/negative part)
      •  :setDefaultXBox360 function (currently used XBox360 controller API in Windows version sucks pretty hard)
    • changed:
      •  :setCapture now accepts "callback" argument to be used instead of instant automatical binding
      •  :grab now would either call callback function or instantly bind captured input
      •  :unset renamed to :unbind
      • controls data table for assignment now have different format
      •  :getJoystickHatMode and :getControlMode now only return literal value
      • joystick axis delta mode no longer requires stick to be on the corresponding side either (that was silly, too)
    • removed:
      •  :getDeviceName (replaced with :getBinded)
  • 1.1:
    • fixed:
      • capturing an input now sets both "previous" and "current" tables to captured input value
      • mouse axis delta mode no longer requires mouse pointer to be on the corresponding side of the offset
    • added:
      • getDeviceName function returns literal name of a device assiged to specified map
    • changed:
      • reloadJoystick now returns true on success
  • 1.0:
    • first release version

See also