Transition effect with lunalua ?

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
AirShip
Fuzzy
Fuzzy
Posts: 1086
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

Transition effect with lunalua ?

Postby AirShip » Tue Feb 07, 2017 12:11 pm

Is it possible to make a transition effect when the player uses a teleport?

Something like that:
https://youtu.be/1m8wL53jzZo?t=46s

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Transition effect with lunalua ?

Postby PixelPest » Tue Feb 07, 2017 8:36 pm

Yes. keyhole.lua draws something like that and depending on the complexity you would use either Graphics.drawImageWP() or Graphics.drawImageToSceneWP(), graphX2.lua or imagic.lua, or Graphics.glDraw(). You'd basically check if the player is warping and then draw the effect via LunaLua

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Transition effect with lunalua ?

Postby Emral » Tue Feb 07, 2017 8:46 pm

Eh, drawImage doesn't do the job at all and graphx2 i don't think can even draw the shape.
The circle fadeout is pretty complex to do in imagic or glDraw from my understanding because you're looking for a rather complex shape (rectangle with circle hole in the middle). You'll notice that the keyhole from keyhole.lua is also pretty obviously not a circle.

For a simple fadeout, there's fade.lua, however, which might not be as fancy but still lets you do fades.
http://wohlsoft.ru/pgewiki/Fade.lua

For the effect you provided... maybe it's worth doing with a shader? Not sure.

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Transition effect with lunalua ?

Postby Hoeloe » Wed Feb 08, 2017 2:46 am

Enjl wrote: The circle fadeout is pretty complex to do in imagic or glDraw from my understanding because you're looking for a rather complex shape (rectangle with circle hole in the middle).
Not if you use capture buffer, then it's pretty easy.

Rixitic
Spike
Spike
Posts: 275
Joined: Sat Dec 12, 2015 1:00 am
Contact:

Re: Transition effect with lunalua ?

Postby Rixitic » Tue Mar 14, 2017 1:16 pm

So I know it's been over a month since the last post but I'd heavily advise against using graphx2. It's really, really horribly optimized.
If you want to make a transition/transition API I'd suggest doing it with either Hoeloe's imagic or manually with glDraw.

Also, if someone does want to make a transition API, this is worth a watch; it's for Unity but the ideas can be applied to glDraw... might even be able to just use the shader provided with the video.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari