Moving Layer Calculations

Need help with any SMBX game-related issues? Ask your questions here.
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?
User avatar
Quantumenace
Pokey
Pokey
Posts: 235
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.

User avatar
Akyuu
Spiny
Spiny
Posts: 41
Joined: Sat Mar 28, 2015 12:35 pm
Current Project: nothing
Location: Google Translater

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)
Yuka is just a failed weeaboo

User avatar
darkhog
Rex
Rex
Posts: 87
Joined: Sat Dec 10, 2016 11:17 pm
Current Project: something grand...
Chat Username: Darkhog

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?

User avatar
Natsu
Ludwig von Koopa
Ludwig von Koopa
Posts: 2893
Joined: Sat Dec 21, 2013 2:40 pm
Current Project: It's a secret to everybody ...
Chat Username: NaviGator

Re: Moving Layer Calculations

Postby Natsu » 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.
Discord quotes
Trace: You're a capable boi

User avatar
darkhog
Rex
Rex
Posts: 87
Joined: Sat Dec 10, 2016 11:17 pm
Current Project: something grand...
Chat Username: Darkhog

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.

User avatar
Natsu
Ludwig von Koopa
Ludwig von Koopa
Posts: 2893
Joined: Sat Dec 21, 2013 2:40 pm
Current Project: It's a secret to everybody ...
Chat Username: NaviGator

Re: Moving Layer Calculations

Postby Natsu » 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.
Discord quotes
Trace: You're a capable boi

User avatar
PixelPest
Edward
Edward
Posts: 6780
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Location: Canada, Eh?
Chat Username: PixelPest
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

User avatar
Natsu
Ludwig von Koopa
Ludwig von Koopa
Posts: 2893
Joined: Sat Dec 21, 2013 2:40 pm
Current Project: It's a secret to everybody ...
Chat Username: NaviGator

Re: Moving Layer Calculations

Postby Natsu » 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.
Discord quotes
Trace: You're a capable boi

User avatar
PixelPest
Edward
Edward
Posts: 6780
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Location: Canada, Eh?
Chat Username: PixelPest
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
Lakitu
Lakitu
Posts: 446
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.
(formerly Jayoshi, Luigi, Luigi.net)

User avatar
Natsu
Ludwig von Koopa
Ludwig von Koopa
Posts: 2893
Joined: Sat Dec 21, 2013 2:40 pm
Current Project: It's a secret to everybody ...
Chat Username: NaviGator

Re: Moving Layer Calculations

Postby Natsu » 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.
Discord quotes
Trace: You're a capable boi

User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 257
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

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.
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image

User avatar
Westretroman
Koopa Shell
Koopa Shell
Posts: 615
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.

User avatar
PixelPest
Edward
Edward
Posts: 6780
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Location: Canada, Eh?
Chat Username: PixelPest
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 “Help and Support”

Who is online

Users browsing this forum: No registered users and 7 guests