Moving Layer Calculations

Share guides you have written for SMBX, and related tools here.
Quantumenace
Ripper II
Ripper II
Posts: 308
Joined: Mon Dec 28, 2015 2:17 am

Re: Moving Layer Calculations

Postby Quantumenace » Sun May 22, 2016 5:55 pm

You can afford to be a few pixels off if you're only moving the layers once, or if you're cycling with the same speed and delay in both directions (since then you know it moves the same distance both ways).

However, you need to be more careful if you cycle back and forth with unequal speeds and delays, otherwise even a small inaccuracy will gradually add up. There's an airship/fortress level in MAGL X where the section with moving platforms becomes impossible to complete if you take too long because they get higher and higher each cycle.

Akyuu
Fighter Fly
Fighter Fly
Posts: 41
Joined: Sat Mar 28, 2015 12:35 pm

Re: Moving Layer Calculations

Postby Akyuu » Mon May 23, 2016 9:46 pm

Trace42 wrote:what i get when i try that is what i always get: invalid Input
the vbs is case sensitive, so you need to answer Speed or Time (capital letters)

darkhog
Dolphin
Dolphin
Posts: 87
Joined: Sat Dec 10, 2016 11:17 pm

Re: Moving Layer Calculations

Postby darkhog » Mon Dec 26, 2016 12:21 am

Good thing. However even after inputing formulas/using vbs I couldn't get it to move exactly the way I wanted to. Perhaps having a way in Lua to detect layer's offset from (0,0) would make things easier?

Fuyu
Boom Boom
Boom Boom
Posts: 3137
Joined: Sat Dec 21, 2013 2:40 pm
Pronouns: He/Him

Re: Moving Layer Calculations

Postby Fuyu » Mon Dec 26, 2016 9:09 am

While the numbers should match and whatever layer you're moving should stop where you want according to the calculations, most of the time that won't happen, not because of the calculation, but because of SMBX itself. Like you said, you're better off using Lua as a means of moving layers since you can detect the exact coordinates yourself and prevent the layer from moving further or not reaching the end.

darkhog
Dolphin
Dolphin
Posts: 87
Joined: Sat Dec 10, 2016 11:17 pm

Re: Moving Layer Calculations

Postby darkhog » Mon Dec 26, 2016 3:57 pm

I don't think I can detect coordinates myself, not without Layer.offsetY/layer.offestX or similar.

Fuyu
Boom Boom
Boom Boom
Posts: 3137
Joined: Sat Dec 21, 2013 2:40 pm
Pronouns: He/Him

Re: Moving Layer Calculations

Postby Fuyu » Mon Dec 26, 2016 4:43 pm

darkhog wrote:I don't think I can detect coordinates myself, not without Layer.offsetY/layer.offestX or similar.
You just mentioned how to get them :v

In Paper Mario: The Thousand Year Door, you can find Luigi’s diary in a secret room in the Mario Bros.’ house, where he tells of his own adventure.

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

Re: Moving Layer Calculations

Postby PixelPest » Mon Dec 26, 2016 5:24 pm

Intuition wrote:
darkhog wrote:I don't think I can detect coordinates myself, not without Layer.offsetY/layer.offestX or similar.
You just mentioned how to get them :v
But they don't exist

Fuyu
Boom Boom
Boom Boom
Posts: 3137
Joined: Sat Dec 21, 2013 2:40 pm
Pronouns: He/Him

Re: Moving Layer Calculations

Postby Fuyu » Mon Dec 26, 2016 6:39 pm

Sorry about that, I was lazy as fuck.

@darkhog: You can just print the player's coordinates and from there is you just try to get the correct numbers.

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

Re: Moving Layer Calculations

Postby PixelPest » Sat Aug 19, 2017 2:14 pm

Btw if you want to use more exact numbers if syncing issues are a problem use 2500/39 instead of 65 or in LunaLua code just use lunatime.toSeconds()

Zha Hong Lang
Buster Beetle
Buster Beetle
Posts: 445
Joined: Thu Jun 22, 2017 10:14 am

Re: Moving Layer Calculations

Postby Zha Hong Lang » Sat Aug 19, 2017 2:28 pm

PixelPest wrote:Btw if you want to use more exact numbers if syncing issues are a problem use 2500/39 instead of 65 or in LunaLua code just use lunatime.toSeconds()
This, so very much.

65 is only one digit of accuracy, which is extremely gosh darn bad and I don't reccommend going by that at all.

Fuyu
Boom Boom
Boom Boom
Posts: 3137
Joined: Sat Dec 21, 2013 2:40 pm
Pronouns: He/Him

Re: Moving Layer Calculations

Postby Fuyu » Fri Nov 03, 2017 9:44 am

PixelPest wrote:Btw if you want to use more exact numbers if syncing issues are a problem use 2500/39 instead of 65 or in LunaLua code just use lunatime.toSeconds()
Added this to the main post.

Devan2002
Ripper II
Ripper II
Posts: 304
Joined: Sun Oct 02, 2016 9:46 am

Re: Moving Layer Calculations

Postby Devan2002 » Sat Nov 25, 2017 10:54 pm

TBH, I don't even calculate it, I just mess with the numbers and see what seems like a good speed and when to change directions of moving layers.

Westretroman
Eerie
Eerie
Posts: 704
Joined: Tue Mar 29, 2016 6:50 pm

Re: Moving Layer Calculations

Postby Westretroman » Sun Nov 26, 2017 1:53 am

Devan2002 wrote:TBH, I don't even calculate it, I just mess with the numbers and see what seems like a good speed and when to change directions of moving layers.
Me too. Saves time and the thinking required to do the action.

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

Re: Moving Layer Calculations

Postby PixelPest » Sun Nov 26, 2017 8:19 am

The issue with that is that your layers will unsync or not stop perfectly against a block and making a 10 second calculation is all you have to do


Return to “Guides”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari