Page 2 of 4

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Fri Apr 07, 2017 6:41 pm
by loop
Mario Maker 200 wrote:Awesome! But I don't have the imagic.lua and I can't find a download for it...
It comes with 2.0. My project uses it.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Sat Apr 08, 2017 3:14 am
by PlumberGraduate
Jayce 777 wrote:
Mario Maker 200 wrote:Awesome! But I don't have the imagic.lua and I can't find a download for it...
It comes with 2.0. My project uses it.
Ok, thanks! :D

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Sat Apr 08, 2017 3:19 am
by Alagirez
Wow this is pawsome! Finally I can hide my easter eggs in my levels with this API(?)!

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Sat Apr 08, 2017 4:30 pm
by Sambo
It's in 2.0 beta 3

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Thu Feb 22, 2018 11:12 pm
by PersonNamedUser
bumpty bumpty

I have a couple questions about this
1. are npcs hidden by this?
2. does the nsmbwalls layer need to be hidden or shown while actually testing the level?

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Fri Feb 23, 2018 3:55 am
by HulluHapua
You Can Simply Use Sizable Objects For Fake Walls Since They Only Have Collision On The Top Of Them.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Fri Feb 23, 2018 6:09 am
by PixelPest
HulluHapua wrote:You Can Simply Use Sizable Objects For Fake Walls Since They Only Have Collision On The Top Of Them.
But then there's no visual effect like in NSMB

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Fri Feb 23, 2018 2:01 pm
by Sambo
Mosaic wrote:bumpty bumpty

I have a couple questions about this
1. are npcs hidden by this?
Yes. The "fake wall" effect is rendered above NPCs.
Mosaic wrote:2. does the nsmbwalls layer need to be hidden or shown while actually testing the level?
It needs to be hidden. If it's shown, the player can interact with the blocks on it.
HulluHapua wrote:You Can Simply Use Sizable Objects For Fake Walls Since They Only Have Collision On The Top Of Them.
That Thing You Do Where You Capitalize All Your Words Is Annoying. Stop It.

Also, yeah, that doesn't work.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Tue Apr 03, 2018 8:47 pm
by 8lue Storm
Sorry for the bump, but I tried to test this feature, following MechDragon777's instructions, but this showed up:
Image
Can someone please tell me what went wrong?

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Tue Apr 03, 2018 9:13 pm
by The0x539
8lue Storm wrote:Sorry for the bump, but I tried to test this feature, following MechDragon777's instructions, but this showed up:
Image
Can someone please tell me what went wrong?
The library is being instructed to draw a GIF. This generally doesn't work in Beta 3. Use PNG graphics.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Tue Apr 03, 2018 9:36 pm
by 8lue Storm
[quote="The0x539"][quote="8lue Storm"]Sorry for the bump, but I tried to test this feature, following MechDragon777's instructions, but this showed up:
[img]https://s31.postimg.org/kfzmltkyj/Fake_Walls_Error.png[/img]
Can someone please tell me what went wrong?[/quote]
The library is being instructed to draw a GIF. This generally doesn't work in Beta 3. Use PNG graphics.[/quote]
I made .png only what I used as fake walls. I guess I should make everything .png, then. Thanks for the advice!

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Tue Apr 24, 2018 2:21 am
by Park Ocean
Ok. This is really good but when i looked at the instructions on the PGE Wiki but it didn't really make sense to me.

Which Lunadll.lua file do i use?

Hopefully you make a video tutorial because i really don't get it.

But I love this!!!

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Wed May 02, 2018 11:30 pm
by MrVaderSpino
That is understand but i want to find the star or Key once it can make more levels.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Thu May 03, 2018 5:20 pm
by FirestarPlays
My episode is actually going to use this, starting with 2-5: Fakewall Flank!

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Tue Nov 06, 2018 8:22 pm
by Novarender
What part of the code draws the nsmbwalls layer as transparent (when player is behind the layer)? Because I want to change it to be more like the original and not draw the blocks at all.

*nevermind

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Fri Apr 12, 2019 10:34 am
by IAmPlayer
So, this is pretty recent, and only happens in MaGLX3 build, but this is broken. The stuff inside are not the walls that was suppose to hide the layer in a lower opacity and the stuff underneath it, but instead, a zoomed out version of what's underneath.
Image
Do you think you can fix this?

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Fri Apr 12, 2019 11:56 am
by Eri7
Oh no that's really bad especially for one of the projects I am working on. Let's hope Sambo fixed this or rip very cool script.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Mon Aug 12, 2019 10:47 pm
by hacheipe399
Hey everyone, I found a quick workaround for this API in the latest SMBX2 PAL Release. You need to locate two lines of code which contain the imagic's ScaleTexture() method. These are within a loop in nsmbwalls.update() event:

Code: Select all

xRays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
and this one:

Code: Select all

overlays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
Replace the multipliers of the radious (variable "r") in this way:

Code: Select all

xRays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))

Code: Select all

overlays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))
And there you go. This makes the camera to shrink too, which isn't a desired behavior, but it's a minor detail. I planned to rewrite this API since imagic isn't recommended anymore, but this fix does the job btw.

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Posted: Mon Aug 12, 2019 10:54 pm
by MECHDRAGON777
hacheipe399 wrote:
Mon Aug 12, 2019 10:47 pm
Hey everyone, I found a quick workaround for this API in the latest SMBX2 PAL Release. You need to locate two lines of code which contain the imagic's ScaleTexture() method. These are within a loop in nsmbwalls.update() event:

Code: Select all

xRays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
and this one:

Code: Select all

overlays[k]:ScaleTexture((800) / (2 * r), (600) / (2 * r))
Replace the multipliers of the radious (variable "r") in this way:

Code: Select all

xRays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))

Code: Select all

overlays[k]:ScaleTexture((800) / (19.8 * r), (600) / (11.3 * r))
And there you go. This makes the camera to shrink too, which isn't a desired behavior, but it's a minor detail. I planned to rewrite this API since imagic isn't recommended anymore, but this fix does the job btw.
I think QuantumMeanance gave me a version which involved inverting something. Maybe s/he could upload her/his version or explain her/his change publicly?

Re: NSMBWalls.lua - Fake Walls! - Workaround for SMBX PAL Release

Posted: Mon Aug 12, 2019 11:50 pm
by hacheipe399
THIS IS THE DEFINITIVE WORKAROUND:

EDIT: you just can get rid of the xRays[k]:ScaleTexture() and overlays[k]:ScaleTexture() lines, but watch out the following step:

Before each ScaleTexture, imagic.Circle{} is assigned to xRays and overlays respectively. Look for "filltype", then change imagic.TEX_FILL for imagic.TEX_PLACE. For example:

Code: Select all

xRays[k] = imagic.Circle
			{
				radius = r,
				x = playerCenterX,
				y = playerCenterY,
				scene = true,
				texture = xRayBuffer,
				filltype = imagic.TEX_PLACE,
				texoffsetX = (centerOnScreenX - 400)/800,
				texoffsetY = (centerOnScreenY - 300)/600
			}
And now we're done! Now it is exactly zoomed and the effect works properly!