Page 3 of 6
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Wed Feb 03, 2010 7:05 pm
by bartbes
pygy wrote:
- TypeMatic (key repeat).
- Unicode.
Those are in love itself?!
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Wed Feb 03, 2010 7:10 pm
by pygy
Regarding unicode, it simply meant "look into the love doc to see how to pass the right argument"
since it was on the to do list, I moved it to the change log without thinking much.
I initially planned to bind a per configuration typematic setting, but I'll get rid of it in the next version, it makes things more complicated for everyone, with little to no gain.
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Wed Feb 17, 2010 6:27 pm
by pygy
Version 0.4.0 is up, as a .love file this time, with a bare bone demo for Polygamy.keyboard and Polygamy.state. :-)
Change log:
- First release of Polygamy.state
- Simplification of the Polygamy.keyboard API
- Custom love.run loop with the ability to insert custom callbacks in the main loop
- The modules are loaded on the fly when needed, and their corresponding callbacks are inserted in the main loop automatically.
- Removed the per config typematic support.
- Polygamy.timer is also bundled, but it's untested and certainly buggy
The documentation in the first post has been changed to match the new API
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Sun Feb 21, 2010 12:26 pm
by tiotags
it doesn't work on linux
( I think the paths aren't cross platform)
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Mon Feb 22, 2010 1:46 pm
by pygy
Thanks for the report.
It wasn't working from the .love here either. It was actually a case error in the paths, which are ignored in OS X but not on Linux or from the archive...
Could you try 0.4.1 and report back? (see the first post).
BTW, Pölygamy is in alpha... I'm still trying to get the API right. While the semantics should remain consistent, the syntax and API details may still change from version to version.
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Wed Apr 14, 2010 12:20 pm
by nevon
Any chance you could reupload Polygamy to another host? I would like to use it in a game I'm currently developing, but ever since the forums started acting up, all the downloads have been broken.
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Fri Apr 16, 2010 11:33 am
by pygy
Glad to hear that!
I don't have web access at home currently, so it may take some time...
I'm currently polishing the next version.
I'll upload the previous, stable one ASAP.
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Fri Apr 16, 2010 12:31 pm
by nevon
pygy wrote:Glad to hear that!
I don't have web access at home currently, so it may take some time...
I'm currently polishing the next version.
I'll upload the previous, stable one ASAP.
What's new in the next version? If it's not too far off from being released, and there are features that could be useful to me, I might just hold off until you've got that released. Either way, thanks for taking the time to re-upload the previous version.
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Fri Apr 16, 2010 3:02 pm
by pygy
The core functionality will remain the same, and it should be mostly backwards compatible.
First, I'll add more modularity.
- The custom love.run() loop will be exported to it's own lib: RunawayBrïde, and the other libraries depend on it.
- The timer/scheduler lib will be called SerialDäter, and will be developed separately.
I may add a "transition" module, where a function is called each frame for a given time (to implement a fade in/out, for example).
- Pölygamy itself will concentrate on "making LÖVE, multiple times" i.e. game state management and input DSL (keyboard only ATM).
For the state module:I'd like to implement stackable states, and a way be able to use each module independently (as it is the case at the moment) or to globally switch the state of all active modules in one command, achieving maximal flexibility and integration, at the Lover's best convenience.
For the keyboard module: I've started some refactoring and simplification: some patterns are of little use,for example, and I'll change the column/row coordinate system (home row = 0, positive upwards, negative downwards, and the arrows/keypad will get x/y coordinates too, using the same logic). Also, an alternative, "syntaxless" DSL is planned.
Here's an example of the DSL
Code: Select all
keyboard "ingame" :config
"esc" :pressed (function() goto "menu" end)
"arrows" :held (function(key, x, y, dt) hero:move(key,dt) end)
{" ", "return"}
:pressed (function() hero:shoot() end)
:held (function(dt) hero:accumulateEnergy(dt) end)
:released (function() hero:KABOOM() end)
"" -- "" closes the definition.
It would look far better if Lua had a short lambda syntax... I've written a patch that allows to write it like this:
Code: Select all
keyboard "ingame" :config
"esc" :pressed .:( ; goto "menu" )
"arrows" :held .:( key, x, y, dt; hero:move(key,dt) )
{" ", "return"}
:pressed .:( ; hero:shoot() )
:held .:(dt; hero:accumulateEnergy(dt) )
:released .:( ; hero:KABOOM() )
""
The Lua authors don't seem interrested, though.
Re: Pölygamy: a collection of LÖVE helper libraries
Posted: Fri Apr 16, 2010 3:23 pm
by kikito
My two cents on this:
I had the same problem while developing PÄSSION; passing functions around seemed very inefficient and somewhat ugly.
Code: Select all
player:observe('keypress_a', function() player:moveRight(10) end)
I noticed that most of the time I was using functions that looked like this: function() someObject:otherFunction() end.
What I ended up doing was accepting functions but also method names. I can now do the previous code this way:
Code: Select all
player:observe('keypress_a', 'moveRight', 10)
So instead of trying to modify Lua, I modified my classes, which are far easier to modify
EDIT: here's
an example of how this behaviour is implemented on the Beholder module.