poof.lua: One-by-one layer transitions [v0.2a]

Share and discuss custom LunaLua code and content packs for SMBX2.
The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

poof.lua: One-by-one layer transitions [v0.2a]

Postby The0x539 » Sat Nov 26, 2016 4:22 pm

Inspired by SMW overworld transitions, and surprisingly not by Yoshi's Island, I give you poof.lua, for use in levels, in-engine level selects, or wherever else:



https://gist.github.com/The0x539/d8b617 ... 31ce2a4362

Use is as simple as:

Code: Select all

local poof = API.load("poof")

function toggleLayer()
	poof.startPoof("layer")
end
Delay between blocks, as well as whether time is frozen or player input is just locked, can be specified by optional second and third arguments.

Though it's quite general-purpose, its intended purpose was for SMW-style transitions in SMBX platformer level selects, as seen in this proof of concept:


https://ptpb.pw/-sNM.ziphttps://ptpb.pw/EFl4.zip

Roadmap?
  • Poof queue, so calling poof.startPoof() twice in a row poofs the layers sequentially, and without stopping at the player position
  • Particle effects
  • 2-player support
  • Options for different camera behavior, teleport to be centered on each tile, don't move at all, move gradually if the structure is bigger than the camera
  • Different ways of sorting the blocks, maybe even manual sorting for particularly fancy stuff
Last edited by The0x539 on Sun Jan 01, 2017 11:01 pm, edited 2 times in total.

Quantix
Ripper II
Ripper II
Posts: 333
Joined: Tue Jan 26, 2016 5:04 pm

Re: poof.lua: Block-by-block layer transitions [v0.1a]

Postby Quantix » Sun Nov 27, 2016 7:43 am

This actually looks like it could be useful for some decent effects. Well job!
Now make one for the world map

Super Mario Channel
Monty Mole
Monty Mole
Posts: 147
Joined: Sun Dec 06, 2015 8:08 am

Re: poof.lua: Block-by-block layer transitions [v0.1a]

Postby Super Mario Channel » Sun Nov 27, 2016 7:53 am

Quantix wrote:Now make one for the world map
Pretty sure you could do that in 2.0... er, was it 1.4.2? I dunno, I just remember you could do it somewhere...

ElectriKong
Posts: 4650
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Pronouns: he/him
Contact:

Re: poof.lua: Block-by-block layer transitions [v0.1a]

Postby ElectriKong » Sun Nov 27, 2016 8:28 am

I am pretty sure this sort of thing is possible without the API by using events and multiple layers.

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: poof.lua: Block-by-block layer transitions [v0.1a]

Postby The0x539 » Sun Nov 27, 2016 9:47 am

King of Eterity wrote:I am pretty sure this sort of thing is possible without the API by using events and multiple layers.
Yes, it is possible. Very possible. It's just as tedious as it is possible, though. You'd have to use a layer for each block, and an event for each layer. This lets you put everything used in one transition into one layer, and set it into motion with just one line of code, maybe 5-10 lines per transition (of basically the same code) if you're looking to make permanent level select transitions like in the second video.

Quantix
Ripper II
Ripper II
Posts: 333
Joined: Tue Jan 26, 2016 5:04 pm

Re: poof.lua: Block-by-block layer transitions [v0.1a]

Postby Quantix » Sun Nov 27, 2016 1:10 pm

Super Mario Channel wrote:
Quantix wrote:Now make one for the world map
Pretty sure you could do that in 2.0... er, was it 1.4.2? I dunno, I just remember you could do it somewhere...
You could do it in 1.4.2 and above actually.

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: poof.lua: Block-by-block layer transitions [v0.1a]

Postby The0x539 » Sun Jan 01, 2017 10:44 pm

Poof v0.2a:
  • Removed the "out" argument, poof now determines whether a layer is hidden, and poofs it accordingly, as a toggle.
  • BGOs and NPCs are now treated identically to blocks.
  • Support for off-grid or oversized things substantially improved.
THIS UPDATE IS GUARANTEED NOT BACKWARDS COMPATIBLE, but just remove the "out" argument and you're good.



Download link in OP.

MarioChallengerX2
Dolphin
Dolphin
Posts: 80
Joined: Sat Dec 31, 2022 4:34 pm
Pronouns: he/him

Re: poof.lua: One-by-one layer transitions [v0.2a]

Postby MarioChallengerX2 » Thu Jan 05, 2023 12:24 pm

Hey, which link do I use? In the main forum post, the second apparently has an unsecure connection. (Unsafe)


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari