YesNoOk
avatar

Parallax on a tall stage (Read 1192 times)

Started by Thedge, August 01, 2014, 09:08:25 pm
Share this topic:
Parallax on a tall stage
#1  August 01, 2014, 09:08:25 pm
  • *****
  • Lazy spriter
  • Demon in heaven gotta carry a knife
    • Bolivia
    • network.mugenguild.com/thedge/
I'm building a remake of the SS2's Chalotte's stage, wich IMHO is the best 2D (or wathever D) stage ever, that painting back there is just simply all kinds of amazing.
Well, that said, I never cared about converting it because without the zoom-out it misses a big chunk of the stage's appeal, last week I runned into a Gif of the stage and decided to give it try in Mugen 1.1 with some changes.

But then, the parallax came, it worked wonders even with the zoom in and out, I have made stages with parallax in the past but I never did a tall stage with parallax.

The problem lies here:
Code:
[BG floor]
type  = parallax
spriteno = 0, 1
start = 0,-110
xscale = 0.7, 1.1276
yscalestart = 100
yscaledelta = 0
delta = 0.7,0.7
mask      = 0


As far as I get, the yscalestart has to be always 100 since it is the percentage that the sprite is scalled at start, the yscaledelta it's the value to be added to the scale for every pixel the camera moves, so, if the camera moved 1 pixel, and I have a yscaledelta my sprite will be 102% of it's original size, with 2 pixels it will be 104% and on.

The thing comes here, I have no idea how the hell this works, checked the KFM stage and got nothing even reusing the values used there.

The problem is nototious in these 3 places
1- Wall-floor union
2- Flowers base on the floor.
3- Character feets

(Don't mind the pink places, I still need to fill those gasps, the Cyan on the floor is there because I had to erase the carpet to make the reflection looks good, and the edit is not done yet.)

Here is how it looks with yscaledelta = 0

KFM, and the flowers sink in the floor.

Here is how it looks with yscaledelta = 0.01

You can see the wall detaches from the floor, and the sinking problem is still present.

When the yscaledelta value is bigger, the wall and floor detaches even more.


When the yscaledelta is negative, the floor goes up behind the wall and reveal a pink area below.


Am I doing something wrong here? Am I missing something else? Please, help.
I am really stuck here, can anyone explian me how this thing work.
That’s when I thought, “good grief”
Just ain’t my belief
Until I saw the holes
Inside his hand
Re: Parallax on a tall stage
#2  August 02, 2014, 07:04:03 am
  • *****
  • Shame on you!
    • USA
Not having ever done this myself, but working with FreeStyleDash making the 3D boxes for the game covers,
You're going to have to work not the way you're thinking.
you have the 1 base image where you want it right? Put it in a different space, but make it look like it hasnt moved.
That would be, move it closer to the camera and shrink it, or put it further back and enlarge it.

Usually if there's a gap where you move up and you see out, the floor is "ok" and the back wall is too far back. You'd want to shrink it and move it forward.

Hopefully this gives you some type of idea and I'm not totally wrong. Like I said, I've worked in a similar fashion but not exactly this.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Parallax on a tall stage
#3  August 02, 2014, 07:31:50 am
  • **
  • NvP!
simple, just attach the Y delta of the wall to the parallax