Those are in love itself?!pygy wrote:
- TypeMatic (key repeat).
- Unicode.
Pölygamy: a collection of LÖVE helper libraries
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Pölygamy: a collection of LÖVE helper libraries
Re: Pölygamy: a collection of LÖVE helper libraries
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.
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.
Hermaphroditism is not a crime. -- LSB Superstar
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
Re: Pölygamy: a collection of LÖVE helper libraries
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:
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
Hermaphroditism is not a crime. -- LSB Superstar
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
Re: Pölygamy: a collection of LÖVE helper libraries
it doesn't work on linux ( I think the paths aren't cross platform)
Re: Pölygamy: a collection of LÖVE helper libraries
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.
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.
Hermaphroditism is not a crime. -- LSB Superstar
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Pölygamy: a collection of LÖVE helper libraries
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
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.
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.
Hermaphroditism is not a crime. -- LSB Superstar
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Pölygamy: a collection of LÖVE helper libraries
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.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.
Re: Pölygamy: a collection of LÖVE helper libraries
The core functionality will remain the same, and it should be mostly backwards compatible.
First, I'll add more modularity.
It would look far better if Lua had a short lambda syntax... I've written a patch that allows to write it like this:
The Lua authors don't seem interrested, though.
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.
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.
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() )
""
Last edited by pygy on Fri Apr 16, 2010 9:37 pm, edited 3 times in total.
Hermaphroditism is not a crime. -- LSB Superstar
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Pölygamy: a collection of LÖVE helper libraries
My two cents on this:
I had the same problem while developing PÄSSION; passing functions around seemed very inefficient and somewhat ugly.
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:
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.
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)
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)
EDIT: here's an example of how this behaviour is implemented on the Beholder module.
When I write def I mean function.
Who is online
Users browsing this forum: Amazon [Bot] and 1 guest