https://github.com/cag/boobs
Input library for LOVE (love2d.org)
https://github.com/cag/boobs
Last synced: 10 months ago
JSON representation
Input library for LOVE (love2d.org)
- Host: GitHub
- URL: https://github.com/cag/boobs
- Owner: cag
- Created: 2010-06-07T07:47:08.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2010-06-12T03:47:19.000Z (about 16 years ago)
- Last Synced: 2025-03-28T22:17:12.332Z (about 1 year ago)
- Language: Lua
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
(.) BOOBS (.)
=============
A juicy input library for LOVE.
by your friend
Alan Lu
== Quick-start guide ==
1. put boobs.update() in love.update somewhere
2. make movelists via = boobs.movelist:new("name me something unique!")
3. for each movelist you make, register sequences in them via :register_sequence(sequence, callback)
4. for each player you got, call = boobs.player:new()
5. bind joystick axes/hat/keys to directions with :bind_dir{ direction description }
6. bind buttons/keys to inputs with :bind_input(symbol, { input description })
7. if you want to flip the horizontal axis for a player, set .hflip = true
== X-TRA NOTES ==
reserved symbols for directions: l r u d lu ru ld rd
things are case sensitive unless you normalize your input
every input you bind produces press events (represented by the symbol you pass in) and release events (represented by symbol.."^")
sequence tokens, or symbols, are deliminated via whitespace
callbacks take one argument, the player index, and don't return anything
players are indexed in the order of their creation
hadoken is pretty much "d rd r p"
SEE: main.lua for an working example < this will probably be the most useful to look at
RECOMMENDED: use this together with a state machine if your sequences overlap to make character behavior consistent
GOTO: http://www.love2d.org
Maek gaems.
Be happy.