Hump & transition image effects
Posted: Sat Jun 18, 2016 4:49 pm
Hi,
What I would like to do is make a set of functions that handle transitions between states in my program. I got the hump library working ok I ran some of the examples but others seemed to be incomplete and error. There was this one snippet of code that was commented as being useful for splash screens but seems that its not a complete example.
One of the reasons why I gave up trying to use the hump.gamestates library was the documentation examples were all fragments and not many of the examples actually were functional. All very interesting but in the end I just wanted an example that worked. Its not like its a book where you have trees to worry about with the extra space that a full working example might take up. (not being too salty I hope. Appreciate the work that was put into the library - but perhaps you could relate to my frustration at the state of the documentation for a guy that is new to love2d and lua.)
So at the moment I have a bunch of files that represent different program states (splash screen, main menu, load game, new game ect..)
https://www.love2d.org/forums/download/ ... w&id=13347
The following youtube clip shows what I mean better than words I guess - this is from the game Etrian Odyssey on the DS. (Wanted to avoid using copyrighted sprites on the forum.) The transition I want to replicate is the following one. Notice how the sprites are tweened across the screen before a fade to the dungeon combat state.
What I am trying to do is figure out a way to use hump to replicate this kind of behavor.
[youtube]https://youtu.be/XclkYTwINDU[/youtube]
(starts at 1m48)
https://youtu.be/XclkYTwINDU?t=1m48s
So what is splash.pos? Further more what is the function splash its not explained in the example.
Questions:
I would like to use the hump.Timer to tween between one image into another in the same way as in the examples they transition from one color to another.
I am guessing its going to take love.graphics.draw am I on the right track?
is it also possible to mess with functions like love.graphics.setBlendMode - say transition between one blend mode to another after a period of time with the hump.Timer?
I have a series of effects images that I want to use with love.graphics.setBlendMode that will come in on a timer and transition to another image.
Then use the tween to load the effect image in love.graphics.setBlendMode - display the composite screen then transition to the final image.
https://www.love2d.org/forums/download/ ... w&id=13341
What I was planning on doing was have a library of transition effects that I could call from the main program ex..
transitionEffect("pixel1" image1, image2, delay)
What I would like to do is make a set of functions that handle transitions between states in my program. I got the hump library working ok I ran some of the examples but others seemed to be incomplete and error. There was this one snippet of code that was commented as being useful for splash screens but seems that its not a complete example.
One of the reasons why I gave up trying to use the hump.gamestates library was the documentation examples were all fragments and not many of the examples actually were functional. All very interesting but in the end I just wanted an example that worked. Its not like its a book where you have trees to worry about with the extra space that a full working example might take up. (not being too salty I hope. Appreciate the work that was put into the library - but perhaps you could relate to my frustration at the state of the documentation for a guy that is new to love2d and lua.)
So at the moment I have a bunch of files that represent different program states (splash screen, main menu, load game, new game ect..)
https://www.love2d.org/forums/download/ ... w&id=13347
The following youtube clip shows what I mean better than words I guess - this is from the game Etrian Odyssey on the DS. (Wanted to avoid using copyrighted sprites on the forum.) The transition I want to replicate is the following one. Notice how the sprites are tweened across the screen before a fade to the dungeon combat state.
What I am trying to do is figure out a way to use hump to replicate this kind of behavor.
[youtube]https://youtu.be/XclkYTwINDU[/youtube]
(starts at 1m48)
https://youtu.be/XclkYTwINDU?t=1m48s
Code: Select all
-- useful for splash screens
Timer.script(function(wait)
Timer.tween(0.5, splash.pos, {x = 300}, 'in-out-quad')
wait(5) -- show the splash for 5 seconds
Timer.tween(0.5, slpash.pos, {x = 800}, 'in-out-quad')
end)
Questions:
I would like to use the hump.Timer to tween between one image into another in the same way as in the examples they transition from one color to another.
Code: Select all
function love.load()
color = {0, 0, 0}
Timer.tween(10, color, {255, 255, 255}, 'in-out-quad')
end
function love.update(dt)
Timer.update(dt)
end
function love.draw()
love.graphics.setBackgroundColor(color)
end
is it also possible to mess with functions like love.graphics.setBlendMode - say transition between one blend mode to another after a period of time with the hump.Timer?
I have a series of effects images that I want to use with love.graphics.setBlendMode that will come in on a timer and transition to another image.
Then use the tween to load the effect image in love.graphics.setBlendMode - display the composite screen then transition to the final image.
https://www.love2d.org/forums/download/ ... w&id=13341
What I was planning on doing was have a library of transition effects that I could call from the main program ex..
transitionEffect("pixel1" image1, image2, delay)