Page 2 of 2
Re: Moving Layer Calculations
Posted: Sun May 22, 2016 5:55 pm
by Quantumenace
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.
Re: Moving Layer Calculations
Posted: Mon May 23, 2016 9:46 pm
by Akyuu
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)
Re: Moving Layer Calculations
Posted: Mon Dec 26, 2016 12:21 am
by darkhog
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?
Re: Moving Layer Calculations
Posted: Mon Dec 26, 2016 9:09 am
by Fuyu
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.
Re: Moving Layer Calculations
Posted: Mon Dec 26, 2016 3:57 pm
by darkhog
I don't think I can detect coordinates myself, not without Layer.offsetY/layer.offestX or similar.
Re: Moving Layer Calculations
Posted: Mon Dec 26, 2016 4:43 pm
by Fuyu
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.
Re: Moving Layer Calculations
Posted: Mon Dec 26, 2016 5:24 pm
by PixelPest
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
Re: Moving Layer Calculations
Posted: Mon Dec 26, 2016 6:39 pm
by Fuyu
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.
Re: Moving Layer Calculations
Posted: Sat Aug 19, 2017 2:14 pm
by PixelPest
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()
Re: Moving Layer Calculations
Posted: Sat Aug 19, 2017 2:28 pm
by Zha Hong Lang
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.
Re: Moving Layer Calculations
Posted: Fri Nov 03, 2017 9:44 am
by Fuyu
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.
Re: Moving Layer Calculations
Posted: Sat Nov 25, 2017 10:54 pm
by Devan2002
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.
Re: Moving Layer Calculations
Posted: Sun Nov 26, 2017 1:53 am
by Westretroman
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.
Re: Moving Layer Calculations
Posted: Sun Nov 26, 2017 8:19 am
by PixelPest
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