I love all the changes. Merged them. Never thought that a little lib I've developed for my game would turn into something people would want to use.
Originally, timer.lua was supplied with venus.lua, so that users won't have to go through the hassle of downloading HUMP.Timer. Still, I think it's better now, as it doesn't inflate venus.lua.
There are few things I've encountered, though:
Default effect is not persistent, you always have to specify if you want to get it.
New registerEvents() caused some bugs where I was unable to press buttons and some other bugs. I'll experiment and bring back the way it used to be and see if it works. [FIXED]
It plays the effect before switching to initial state. That doesn't look good. First state should not have an animation.
EDIT: I fixed the registerEvents() to work properly. After addresing other issues, I'll push all changes.
Venus - A gamestate library with smooth transitions
Re: Venus - A gamestate library with smooth transitions
I'm glad you like the changes! It's always nice to see your projects grow xDChroteus wrote:I love all the changes. Merged them. Never thought that a little lib I've developed for my game would turn into something people would want to use.
I like to keep any 3rd party scripts separate so they can be updated when the need arises.Chroteus wrote:Originally, HUMP.Timer was just supplied with venus.lua, so that users won't have to go through the hassle of downloading HUMP.Timer. Still, I think it's better now, as it doesn't inflate venus.lua.
Oh right, I did make it reset to fade after every transition. I will add a function to assign a new default without having to edit Venus. Have a fiddle with your other issues and let me know what you find out. I'd like to know where I went wrong as I've only just started using LÖVE.Chroteus wrote:There are few things I've encountered, though:
Default effect is not persistent, you always have to specify if you want to get it.
New registerEvents() caused some bugs where I was unable to press buttons and some other bugs. I'll experiment and bring back the way it used to be and see if it works.
It plays the effect before switching to initial state. That doesn't look good. First state should not have an animation.
Developer and Founder of The LANBox
Re: Venus - A gamestate library with smooth transitions
I've solved all the issues and changed default duration to 1, because 0.5 is too fast.
EDIT: I also added two new function to set default values for effect and duration. Those are:
venus.setDefaultEffect(effect)
A string. Sets default effect. If not called, the default value is "fade"
venus.setDefaultDuration(num)
Sets default duration of effects. If not called, the default value is 1.
EDIT: I also added two new function to set default values for effect and duration. Those are:
venus.setDefaultEffect(effect)
A string. Sets default effect. If not called, the default value is "fade"
venus.setDefaultDuration(num)
Sets default duration of effects. If not called, the default value is 1.
Github: https://github.com/chroteus
Re: Venus - A gamestate library with smooth transitions
I was going to go down that road myself but you'll see my pull request that I realised you can reference venus.duration directly. The functions were just bloating things up for no reason!
Did you solve your other problems or were they just related to how I was handling defaults?
Did you solve your other problems or were they just related to how I was handling defaults?
Developer and Founder of The LANBox
Re: Venus - A gamestate library with smooth transitions
Good idea. I cannot merge your changes right away (as I already fixed up some things), but I'll implement what you did with handling of defaults.blaknite wrote:I was going to go down that road myself but you'll see my pull request that I realised you can reference venus.duration directly. The functions were just bloating things up for no reason!
Yeah, I did and they had nothing to do with your handling of defaults.Did you solve your other problems or were they just related to how I was handling defaults?
Github: https://github.com/chroteus
Re: Venus - A gamestate library with smooth transitions
Cool beans. I'll just slap my commits up on github as I go, they'll show in the current pull request. Feel free to pick and choose as you see fit.Chroteus wrote:Good idea. I cannot merge your changes right away (as I already fixed up some things), but I'll implement what you did with handling of defaults.
I was thinking that slide could take an optional direction and all transitions could take a tween method as an argument. This would mean that slide and fall would be the same but with a different direction. Maybe a job for another day. When I get started I just don't stop!
Developer and Founder of The LANBox
Re: Venus - A gamestate library with smooth transitions
I incorporated all the changes and updated docs. I already have some ideas for dynamic "slide".blaknite wrote:Cool beans. I'll just slap my commits up on github as I go, they'll show in the current pull request. Feel free to pick and choose as you see fit.Chroteus wrote:Good idea. I cannot merge your changes right away (as I already fixed up some things), but I'll implement what you did with handling of defaults.
I was thinking that slide could take an optional direction and all transitions could take a tween method as an argument. This would mean that slide and fall would be the same but with a different direction. Maybe a job for another day. When I get started I just don't stop!
Github: https://github.com/chroteus
Re: Venus - A gamestate library with smooth transitions
Awesome can't wait to see what you come up with.
Developer and Founder of The LANBox
Re: Venus - A gamestate library with smooth transitions
I can't keep up with you, I merge stuff, developed a new feature and you've already written something else!
By the way, I already fixed the bug where calling update(dt) failed, so there was no need for that.
EDIT: I closed that pull request because I implemented most of that already.
EDIT2: I added slide with directions. I won't be developing Venus much, since I'll be working on my game, so I can give you full access to repo if you want.
By the way, I already fixed the bug where calling update(dt) failed, so there was no need for that.
EDIT: I closed that pull request because I implemented most of that already.
EDIT2: I added slide with directions. I won't be developing Venus much, since I'll be working on my game, so I can give you full access to repo if you want.
Github: https://github.com/chroteus
Re: Venus - A gamestate library with smooth transitions
I love to push things as I go and sometimes that means the pull request gets big
If you're willing to let me in to main repo I'm more than willing to keep working on it. Now that I've got my branch working how I like it's doubtful I'll add more until I need it but I might as well add it directly.
I haven't had a chance to have a look at your directional slide animation because like you I've actually been working on game things. When I hit a wall I'll take a look.
If you're willing to let me in to main repo I'm more than willing to keep working on it. Now that I've got my branch working how I like it's doubtful I'll add more until I need it but I might as well add it directly.
I haven't had a chance to have a look at your directional slide animation because like you I've actually been working on game things. When I hit a wall I'll take a look.
Developer and Founder of The LANBox
Who is online
Users browsing this forum: No registered users and 6 guests