i think the abillity to set 2 values for a single property (image alpha, x position, y position etc) and have the engine tween those 2 together and run it would be usefull. for example
tween = love.something.tween(0,30,5)
ball:setX(tween)
the tween would continue to loop from 0 to 30 every 5 seconds (so -> 6, 12, 18, 24, 30 and repeat). leaving it like that would make the ball move right from 0 to 30 over and over again. in the balls update step, we could check the status of the tween and do stuff accordingly.
if tween:status == "loopend" then...etc
i havnt thought it out very well but i just wanted to put the idea out there. i see its main uses in gui's and background effects. other uses could be for platforms in 2d games for example. since the tween would simply return a number, it isnt restricted to only altering the x and y of an object as well. you could combine it with anything that requires a number as a parameter.
anywho, tell me your ideas.
edit:
technocats video is a good example of how it could be used for a menu. see how most of the "buttons" move about? on the main menu for example, clicking on "music" hides everything else and smoothly animates the text from its current possition to the very top, increasing its size at the same time. you could achieve this with 3 tweens - ones for size, x coords and y coords .
tweening
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: tweening
I had an idea for a library for love to do things like that: Fling (or FLash INspired Graphics). Haven't done anything for it yet.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: tweening
Seems like something that can be easily done from a user-created library. (in pure lua)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: tweening
== Flingbartbes wrote:Seems like something that can be easily done from a user-created library. (in pure lua)
Help us help you: attach a .love.
- TechnoCat
- Inner party member
- Posts: 1612
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: tweening
Fling: a library Robin's thread.Robin wrote:== Flingbartbes wrote:Seems like something that can be easily done from a user-created library. (in pure lua)
Who is online
Users browsing this forum: Bing [Bot] and 3 guests