Animating Effects/Transitions

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Angrycrow
Prole
Posts: 29
Joined: Fri Mar 06, 2009 8:16 pm
Location: Los Angeles
Contact:

Animating Effects/Transitions

Post by Angrycrow » Wed Sep 09, 2009 11:29 pm

I know that LOVE supports GIF/Sprite batch techniques for animation.

Before I go off and do it myself are there any tween/ fade libraries that are written with love or are compatible?

For example. If I'm making a button/image fade in and out. or flash shift over when the mouse is hovering.

I feel like there is already a better solution for simple shift over/shift back animation.

I know it's not part of CORE GAME DESIGN ( which I'd love to talk about), But aesthetically what ways does LOVE support graphic design? Visual feedback as part of game design.
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
- Dr. Seuss

User avatar
Jasoco
Inner party member
Posts: 3651
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Animating Effects/Transitions

Post by Jasoco » Thu Sep 10, 2009 12:52 am

I wouldn't mind one either. Fading down and up. I've usually built my own in other languages. But am having trouble doing it in LÖVE.

I just need to get one for transitioning between maps. So I don't need some complex thing. I even use my own camera system rather than overloading my code with a separate framework.

Also, animations have been removed from the next version.

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Animating Effects/Transitions

Post by Robin » Thu Sep 10, 2009 3:10 pm

I have started Fling, which is a library to do flash-like things in LÖVE, however it is hugely unfinished. But if you or anyone have something for Fling, you can just add it, since it belongs to the community.
Help us help you: attach a .love.

User avatar
Angrycrow
Prole
Posts: 29
Joined: Fri Mar 06, 2009 8:16 pm
Location: Los Angeles
Contact:

Re: Animating Effects/Transitions

Post by Angrycrow » Sat Sep 12, 2009 10:17 pm

Animations have been removed from the next version?

Maybe there is a way to reconstruct movieclip animations from flash. In CS3+ you can export an animation behavior to an XML file. Maybe there is a way to reconstruct those transitions. It seems kind of far off.

Is there any news around the community for people developing software with love that IS a game building tool. Something that interactive that works with TILEd or some kind of visual asset manager for game objects. Like a UI/ game state builder.

Seriously if it comes down to it I'll just be writing lua modules for a little while.

On a side note. If I want to make 'loading' Screens, or even manage large amounts of assets how do I getBytesLoaded()/total(). How does LOVE/ lua handle data on that level?
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
- Dr. Seuss

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Animating Effects/Transitions

Post by Robin » Sat Sep 12, 2009 11:10 pm

Angrycrow wrote:Animations have been removed from the next version?
The good news: it has a replacement. bartbes wrote a Lua library (AnAL) for that purpose.
Angrycrow wrote:Maybe there is a way to reconstruct movieclip animations from flash. In CS3+ you can export an animation behavior to an XML file. Maybe there is a way to reconstruct those transitions. It seems kind of far off.
nn...I don't think that'll be easy. Lua is not so strong with XML, I think.
Angrycrow wrote:On a side note. If I want to make 'loading' Screens, or even manage large amounts of assets how do I getBytesLoaded()/total(). How does LOVE/ lua handle data on that level?
AFAIK, the only way to do it is to guesstimate the amount to load:

Code: Select all

dataToLoad = {{"img1.png", 23192}, {"img2.png", 46414}, {"img3.png", 94620}} --filename=size
images = {}
totaltoload = 0
for i,v in ipairs(dataToLoad) do
    totaltoload = totaltoload + v[2]
end

function load()
     loadingstate = 1
     loaded = 0
end

function update(dt)
    if loadingstate <= #dataToLoad then
        images[loadingstate] = love.graphics.newImage(dataToLoad[loadingstate][1])
        loaded = loaded + dataToLoad[loadingstate][2]
        loadingstate = loadingstate + 1
    else
        --game logic here
    end
end

function draw()
    --do something with totaltoload and loaded
end
Help us help you: attach a .love.

User avatar
Angrycrow
Prole
Posts: 29
Joined: Fri Mar 06, 2009 8:16 pm
Location: Los Angeles
Contact:

Re: Animating Effects/Transitions

Post by Angrycrow » Sun Sep 13, 2009 1:05 am

Thanks! This looks interesting.

For something like this I'd rather fake it anyway. It really doesn't matter to me or the player exactly what percentage is loading. I'm pretty sure I can use this to fake it.

Do you know when the next version is supposed to come along?
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
- Dr. Seuss

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Animating Effects/Transitions

Post by bartbes » Sun Sep 13, 2009 6:02 am

I know the standard C way is seeking to the end and using tell to get the position, however I do know PhysFS has a length function.

User avatar
zugamifk
Prole
Posts: 28
Joined: Sun Jul 26, 2009 4:01 pm

Re: Animating Effects/Transitions

Post by zugamifk » Sun Sep 20, 2009 8:37 am

I seem to remember that LOVE supports additive blending. Could you use that for highlighting buttons or somesuch?

User avatar
Angrycrow
Prole
Posts: 29
Joined: Fri Mar 06, 2009 8:16 pm
Location: Los Angeles
Contact:

Re: Animating Effects/Transitions

Post by Angrycrow » Tue Sep 29, 2009 6:43 pm

Definitely. I'm going to use color definitions with the alpha changing over time.

like.

full = 255
color [Black] (0,0,0,opa)

while opa < full
opa +=5
end


When it comes to handling time with love do I want to just get the difference between the os Time ? Is there a faster way to get a millisecond clock?
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
- Dr. Seuss

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Animating Effects/Transitions

Post by Robin » Tue Sep 29, 2009 6:45 pm

Angrycrow wrote:When it comes to handling time with love do I want to just get the difference between the os Time ? Is there a faster way to get a millisecond clock?
Do you mean the dt variable?
Help us help you: attach a .love.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 31 guests