Venus - A gamestate library with smooth transitions

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Chroteus
Citizen
Posts: 89
Joined: Wed Mar 20, 2013 7:30 pm

Re: Venus - A gamestate library with smooth transitions

Post by Chroteus »

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.
User avatar
blaknite
Prole
Posts: 10
Joined: Wed May 28, 2014 1:44 pm
Location: Adelaide, Australia
Contact:

Re: Venus - A gamestate library with smooth transitions

Post by blaknite »

Chroteus 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'm glad you like the changes! It's always nice to see your projects grow xD
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.
I like to keep any 3rd party scripts separate so they can be updated when the need arises.
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.
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.
Developer and Founder of The LANBox
User avatar
Chroteus
Citizen
Posts: 89
Joined: Wed Mar 20, 2013 7:30 pm

Re: Venus - A gamestate library with smooth transitions

Post by Chroteus »

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.
User avatar
blaknite
Prole
Posts: 10
Joined: Wed May 28, 2014 1:44 pm
Location: Adelaide, Australia
Contact:

Re: Venus - A gamestate library with smooth transitions

Post by blaknite »

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?
Developer and Founder of The LANBox
User avatar
Chroteus
Citizen
Posts: 89
Joined: Wed Mar 20, 2013 7:30 pm

Re: Venus - A gamestate library with smooth transitions

Post by Chroteus »

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!
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.
Did you solve your other problems or were they just related to how I was handling defaults?
Yeah, I did and they had nothing to do with your handling of defaults.
User avatar
blaknite
Prole
Posts: 10
Joined: Wed May 28, 2014 1:44 pm
Location: Adelaide, Australia
Contact:

Re: Venus - A gamestate library with smooth transitions

Post by blaknite »

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.
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.

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
User avatar
Chroteus
Citizen
Posts: 89
Joined: Wed Mar 20, 2013 7:30 pm

Re: Venus - A gamestate library with smooth transitions

Post by Chroteus »

blaknite wrote:
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.
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.

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!
I incorporated all the changes and updated docs. I already have some ideas for dynamic "slide".
User avatar
blaknite
Prole
Posts: 10
Joined: Wed May 28, 2014 1:44 pm
Location: Adelaide, Australia
Contact:

Re: Venus - A gamestate library with smooth transitions

Post by blaknite »

Awesome can't wait to see what you come up with.
Developer and Founder of The LANBox
User avatar
Chroteus
Citizen
Posts: 89
Joined: Wed Mar 20, 2013 7:30 pm

Re: Venus - A gamestate library with smooth transitions

Post by Chroteus »

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.
User avatar
blaknite
Prole
Posts: 10
Joined: Wed May 28, 2014 1:44 pm
Location: Adelaide, Australia
Contact:

Re: Venus - A gamestate library with smooth transitions

Post by blaknite »

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.
Developer and Founder of The LANBox
Post Reply

Who is online

Users browsing this forum: No registered users and 201 guests