I was recently thinking about a LÖVE plug-in for Firefox. I decided that it is something that could be done, but not by me. However, that got me thinking about Flash (because, well, I don't really need to explain that, do I?), and thus was Fling born: a FLash INspired Graphics library. It's still in it's infancy, so it might change radically, and you can't do a lot with it (run the .love file to see what is).
I think the LPCL is appropriate here.
See latest post for new version.
Fling: a library
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Fling: a library
- Attachments
-
- flingtest.love
- (2.09 KiB) Downloaded 298 times
Last edited by Robin on Thu Sep 10, 2009 3:34 pm, edited 1 time in total.
Help us help you: attach a .love.
Re: Fling: a library
Interesting, this way of scripting the animation once, and letting the engine doing the rest. I'm not sure how interactive this can be made. More for cutscenes or something like that perhaps?
"When in doubt, use brute force." Ken Thompson
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Denver, CO
- Contact:
Re: Fling: a library
I really like this idea. Sometimes you just want a scripted animation in your menus that don't necessarily need to be adaptable to anything.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Fling: a library
That looks great, though you might want to move
out of fling, and into the main.lua. Another thing, is there a way to draw a single animated image? Like fling.draw(img1)?
Code: Select all
update = fling.update
draw = fling.draw
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Fling: a library
Why? I added those two lines so it would use fling.update() and fling.draw() if no update() and draw() were defined. That way, any .love using Fling would be an animation by default, unless they added some interactive code by themselves.bartbes wrote:That looks great, though you might want to moveout of fling, and into the main.lua.Code: Select all
update = fling.update draw = fling.draw
For the record, fling.update() and fling.draw() can be used for animating cutscenes and the like:
Code: Select all
function update(dt)
if cutscene then
fling.update(dt)
if #fling.queue == 0 then cutscene = false end
else
-- all the usual stuff
if x > 100 then
-- prepare cutscene
cutscene = true
end
end
end
function draw(dt)
if cutscene then
fling.draw()
else
-- draw the usual
end
end
Good idea. I'll start implementing it right away.bartbes wrote:Another thing, is there a way to draw a single animated image? Like fling.draw(img1)?
Me neither. But we'll find out along the way.Tenoch wrote:I'm not sure how interactive this can be made.
Help us help you: attach a .love.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Denver, CO
- Contact:
Re: Fling: a library
I library like this needs easing in the motion.
like so: jQuery Easing Plugin (version 1.3)
like so: jQuery Easing Plugin (version 1.3)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Fling: a library
Interesting... I think you're right. I will try to implement it.TechnoCat wrote:I library like this needs easing in the motion.
like so: jQuery Easing Plugin (version 1.3)
By the way, I found this page very useful, and the pdf link in particular.
Help us help you: attach a .love.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Denver, CO
- Contact:
Re: Fling: a library
Whoa, definitely bookmarking that.Robin wrote:By the way, I found this page very useful, and the pdf link in particular.
EDIT: Don't forget to check out the jQuery Easing v1.3 source.
EDIT2: That pdf was an interesting read. Almost makes it look easy. The author's humor was also appreciated by me.
Re: Fling: a library
looks very nice robin. exactly what i had in mind as well when i made a thread. i dont have the know how to do it though :p
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Fling: a library
New version!
I've implemented fling.draw(img1), started with callbacks (for example a function will be called if a certain key is pressed), and the easing functions.
Especially with the last I'm having some difficulties. I think it might be due to the way I implemented the rest of Fling.
I've implemented fling.draw(img1), started with callbacks (for example a function will be called if a certain key is pressed), and the easing functions.
Especially with the last I'm having some difficulties. I think it might be due to the way I implemented the rest of Fling.
- Attachments
-
- flingtest2.love
- (2.53 KiB) Downloaded 187 times
Help us help you: attach a .love.
Who is online
Users browsing this forum: Bing [Bot], darkfrei and 89 guests