[NPC Pack] Celeste Boost Bubble

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

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

[NPC Pack] Celeste Boost Bubble

Postby Emral » Sat Dec 19, 2020 3:35 am

https://drive.google.com/file/d/1To_ZCC ... sp=sharing

Image

From Subzero Heroes, imitating the Celeste Chapter 5 Boost Bubble.
Features 5 levels of durability: 0-3 bounces, and infinite bounces. Bubbles can bounce off blocks while they have bounces left. There is also a BGO included that instantly terminates the bubble.
May work a bit funky with weird slope setups, so if you find yourself zipping out of the level... move some blocks around.
Configurable variables of boostbubble.lua are:
boostbubble.speed = 8.5
boostbubble.cancelBGOID = 754

boostbubble.lua is automatically loaded by the NPC. Afterimages.lua is required and included.
Last edited by Emral on Sat Dec 19, 2020 5:11 am, edited 1 time in total.

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: [NPC Pack] Celeste Boost Bubble

Postby MECHDRAGON777 » Sat Dec 19, 2020 3:52 am

This is actually the thing I have been waiting for the most to be released. Thanks.

ShadowLabrys101
Swooper
Swooper
Posts: 73
Joined: Thu Jan 09, 2014 3:14 pm

Re: [NPC Pack] Celeste Boost Bubble

Postby ShadowLabrys101 » Sat Dec 19, 2020 8:04 am

I wonder if you can also include those background laser things from Subzero Heroes, too!

Chilly14
Snifit
Snifit
Posts: 236
Joined: Thu Jul 18, 2019 10:28 pm
Flair: wash your hands and stay at home
Pronouns: he/him

Re: [NPC Pack] Celeste Boost Bubble

Postby Chilly14 » Sat Dec 19, 2020 10:34 am

Umm...the Bubble Terminator isn't working.
Spoiler: show
Image

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

Re: [NPC Pack] Celeste Boost Bubble

Postby Emral » Sat Dec 19, 2020 5:28 pm

Chilly14 wrote:
Sat Dec 19, 2020 10:34 am
Umm...the Bubble Terminator isn't working.
Spoiler: show
Image
Just updated the link with a fix to that and a crash that could occur if you hit another bubble while the just-entered bubble was in its bounceback animation.

UnderscoreFyreNova
Blooper
Blooper
Posts: 172
Joined: Wed Dec 27, 2017 11:48 am
Flair: Rock hard!
Pronouns: He/Him

Re: [NPC Pack] Celeste Boost Bubble

Postby UnderscoreFyreNova » Wed Dec 23, 2020 6:30 pm

Enjl wrote:
Sat Dec 19, 2020 3:35 am
https://drive.google.com/file/d/1To_ZCC ... sp=sharing

Image

From Subzero Heroes, imitating the Celeste Chapter 5 Boost Bubble.
Features 5 levels of durability: 0-3 bounces, and infinite bounces. Bubbles can bounce off blocks while they have bounces left. There is also a BGO included that instantly terminates the bubble.
May work a bit funky with weird slope setups, so if you find yourself zipping out of the level... move some blocks around.
Configurable variables of boostbubble.lua are:
boostbubble.speed = 8.5
boostbubble.cancelBGOID = 754

boostbubble.lua is automatically loaded by the NPC. Afterimages.lua is required and included.
these looked cool,
so i remade them in 38a: show
Image

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

Re: [NPC Pack] Celeste Boost Bubble

Postby Emral » Thu Dec 24, 2020 2:54 am

skyhighway wrote:
Wed Dec 23, 2020 6:30 pm
these looked cool,
so i remade them in 38a: show
You didn't copy any of the juicy animations! They look comparatively unsatisfying as a result!
Can they bounce off walls and slopes? Mine use continuous collision detection to avoid jank with that, so it might be difficult, but opens up a lot of cool setup potential.

UnderscoreFyreNova
Blooper
Blooper
Posts: 172
Joined: Wed Dec 27, 2017 11:48 am
Flair: Rock hard!
Pronouns: He/Him

Re: [NPC Pack] Celeste Boost Bubble

Postby UnderscoreFyreNova » Fri Dec 25, 2020 10:34 am

Enjl wrote:
Thu Dec 24, 2020 2:54 am
skyhighway wrote:
Wed Dec 23, 2020 6:30 pm
these looked cool,
so i remade them in 38a: show
You didn't copy any of the juicy animations! They look comparatively unsatisfying as a result!
Can they bounce off walls and slopes? Mine use continuous collision detection to avoid jank with that, so it might be difficult, but opens up a lot of cool setup potential.
the kickback animation was almost implemented, but my math was off. i think i've figured it out though, so i'm going to try again. as for bouncing off walls, not yet, but i have several ideas on how to make it tick.

AlanLive2020
Buster Beetle
Buster Beetle
Posts: 98
Joined: Fri Nov 27, 2020 8:15 am
Flair: The guy with no social skills or self-esteem :')

Re: [NPC Pack] Celeste Boost Bubble

Postby AlanLive2020 » Fri Dec 25, 2020 1:02 pm

I've never played celeste, but this seems pretty cool, especially with the animations!

I honestly sometimes wonder how people even make these kind of stuff in this game.

UnderscoreFyreNova
Blooper
Blooper
Posts: 172
Joined: Wed Dec 27, 2017 11:48 am
Flair: Rock hard!
Pronouns: He/Him

Re: [NPC Pack] Celeste Boost Bubble

Postby UnderscoreFyreNova » Fri Dec 25, 2020 10:11 pm

AlanLive2020 wrote:
Fri Dec 25, 2020 1:02 pm
I've never played celeste, but this seems pretty cool, especially with the animations!

I honestly sometimes wonder how people even make these kind of stuff in this game.
code, prayer, and a fuckton of not knowing why your script even works

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: [NPC Pack] Celeste Boost Bubble

Postby MECHDRAGON777 » Fri Dec 25, 2020 11:04 pm

I have to ask, is the speed of the booster the same as Mario's max speed or...?

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

Re: [NPC Pack] Celeste Boost Bubble

Postby Emral » Fri Dec 25, 2020 11:06 pm

MECHDRAGON777 wrote:
Fri Dec 25, 2020 11:04 pm
I have to ask, is the speed of the booster the same as Mario's max speed or...?
Check the first post. It's configurable. 8.5 just felt good when I used it.
Enjl wrote:
Sat Dec 19, 2020 3:35 am
boostbubble.speed = 8.5

Wiimeiser
Snifit
Snifit
Posts: 215
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: [NPC Pack] Celeste Boost Bubble

Postby Wiimeiser » Tue Aug 03, 2021 9:16 pm

I seem to be getting some sort of error when one is placed in the level. I assume something is wrong with afterimages in this case? The issue is on line 127. Also, I'm not getting any afterimages at all, so I assume that would be the issue?

Wiimeiser
Snifit
Snifit
Posts: 215
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: [NPC Pack] Celeste Boost Bubble

Postby Wiimeiser » Thu Aug 05, 2021 11:42 pm

I fixed the problem by commenting out lines 127-141. Now it just blinks in and out of a blank frame and disappears entirely when I get in. It still displays the afterimages, though, meaning that dependency isn't the problem. So I guess whatever effect is being used isn't supported by the game, unless there's another dependency I'm missing and isn't available here...

Code: Select all

	Graphics.drawImageToSceneWP(
		bubbleImage,
		v.x + 0.5 * v.width - 24,
		v.y + 0.5 * v.height - 24,
		48 * (4 - v.ai5),
		48 * v.animationFrame,
		48,
		48,
		-25
	)
It looks like Graphics.drawImageToSceneWP is an invalid method of displaying images, despite it being right there in the ff_graphics.lua file:

Code: Select all

function Graphics.drawImageToSceneWP(img, x, y, arg4, arg5, arg6, arg7, arg8, arg9)
	baseDrawImage(img, x, y, true, true, arg4, arg5, arg6, arg7, arg8, arg9)
end
I think I'll just settle for the frame being empty and it blinking in and out between the empty frame and the editor graphic.

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

Re: [NPC Pack] Celeste Boost Bubble

Postby Emral » Fri Aug 06, 2021 12:55 am

Wiimeiser wrote:
Tue Aug 03, 2021 9:16 pm
I seem to be getting some sort of error when one is placed in the level. I assume something is wrong with afterimages in this case? The issue is on line 127. Also, I'm not getting any afterimages at all, so I assume that would be the issue?
Can you show the error? What version of SMBX2 are you using? Graphics.drawImageToSceneWP has been used for 7 years in just about every level that uses lua.

Wiimeiser
Snifit
Snifit
Posts: 215
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: [NPC Pack] Celeste Boost Bubble

Postby Wiimeiser » Fri Aug 06, 2021 4:10 am

The error is "Invalid type for img" and is spammed every frame. The rest is just the stack traceback. If you need an actual screenshot of it let me know.

It specifically points to the command "function bub.onDrawBubble(v)" and commenting out that and everything up to and including the "end" stops the error, but makes the bubble alternate between its default editor frame and a blank frame, while turning completely invisible when activated. If Graphics.drawImageToSceneWP isn't glitching up here then there's something wrong with the "bubble.png" file. I don't know what that might be.

My editor version says "Moondust - editor version 0.3.2.1 24d76cf master, x86_64 (64 bit)", the game itself is 2.0.0 b4 but I'm not sure what specific version, I have Boohemoth though so that narrows things down considerably. I also have two other NPCs that use drawImageToSceneWP (that I've found so far, these being the warp hub and binoculars) and both work perfectly fine, though it seems both use that command to draw the exclamation point used to indicate you can trigger them, so maybe that's where the problem lies?

EDIT: I tried swapping the graphics around and it still gives the same error. Interestingly, swapping the exclamation out for bubbleImage on the binoculars also produces the error, suggesting drawImageToSceneWP is only designed to be used for the ! that appears next to an NPC you can talk to. Since that's the only thing any of my other custom NPCs seem to be using it for. I'll keep looking to see if it gets used for anything else, though.

EDIT2: The Hotel Mario door uses drawImageToSceneWP as well:

Code: Select all

	Graphics.drawImageToSceneWP(Graphics.loadImageResolved("npc-"..v.id..".png"), v.x, v.y, 0, (0+dircheck+1)*v.height, v.width, v.height, -57)
I fixed the error by reformatting the function to this:

Code: Select all

Graphics.drawImageToSceneWP(Graphics.loadImageResolved("bubble.png"), v.x + 0.5 * v.width - 24, v.y + 0.5 * v.height - 24, 48 * (4 - v.ai5), 48 * v.animationFrame, 48, 48, -25)


Return to “LunaLua”

Who is online

Users browsing this forum: JoseDaBestGamer and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari