Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Water Paralax


Sockman

Recommended Posts

So I've been curious about parallax backgrounds that are relative to the position of the water's surface.

I'm sure it's as easy as tacking on the water surface's X and Y values onto somewhere into the parallax offset values or something like that.

Also, would the expression have to change depending on if the object would be based above or beneath the water?

hydrocity11.png

And in case you don't know already, this is in MMF2.

Link to comment
Share on other sites

Sockman, it's quite simple. The water horizon is done by the use of active, positiones as parallax, pretty much like you would do for other parallax pieces. The only difference is that you also change it's scale, in relation of the camera position and the water horizon, meaning:

HorizonOverWater.YScale = Min(Max((Screen.TopScroll-Water.Level)/HorizonOverWater.Height, 1), 0)

This works for the overwater surface horizon, as long as the hot spot is positioned at the top of the active. For the underwater horizon, you use the hot spot to the bottom of the active and switch operands.

HorizonUnderWater.YScale = Min(Max((Water.Level-Screen.TopScroll)/HorizonUnderWater.Height, 1), 0)

Link to comment
Share on other sites

  • 3 weeks later...

Well, I would like to get back to this topic once more.

Isn't there no other way than using actives? I would like to scroll each line at different x-speed + resize it to create an "look on top and underneath"-effect like in Sonic 3.

Edit:

Using background system boxes for each line is just too much work and probably not good for performance either.

@Damizean: Did you get my examplefile?

Link to comment
Share on other sites

I think this is the most common question people ask.

WATER PARALAX IS THE MOST COMMON QUESTION PEOPLE ASK. AYLING SAID SO.

My experience says otherwise.

Someone should really make a topic with all the popular Questions.

You mean...a FAQ? Here's my problem with that: some people will not read it and just make the thread anyway. Just let the inexperienced ask easy questions, because we always seem to answer them, usually, in nice and simple manner anyway. You, for some reason, have a problem with this sort of thing and will act like the second coming of the fangaming Jesus when John Q. Public asks how to make Sonic run up slopes in GM7. Why complain? It's FREE REP.

If I wasn't on my Wii I would.

And if you eventually DO make it, I will promptly dispose of it.

Link to comment
Share on other sites

I did a quick Google search and found this on the clickteam forums.

Parallax Scrolling / Raster Method Parallax Scrolling - Raster-method Looks like exactly what you want.

Yep, that's me at another forum asking the same thing ;). Like I said, so far it's been possible to scroll each line on the x-axis (using overlay redux). I would like it to y-scroll too. That's what I'm looking for.

Link to comment
Share on other sites

WATER PARALAX IS THE MOST COMMON QUESTION PEOPLE ASK. AYLING SAID SO.

My experience says otherwise.

You mean...a FAQ? Here's my problem with that: some people will not read it and just make the thread anyway. Just let the inexperienced ask easy questions, because we always seem to answer them, usually, in nice and simple manner anyway. You, for some reason, have a problem with this sort of thing and will act like the second coming of the fangaming Jesus when John Q. Public asks how to make Sonic run up slopes in GM7. Why complain? It's FREE REP.

And if you eventually DO make it, I will promptly dispose of it.

Ok then. I just figured a topic with homing attack, water paralax, and common questions would be a good thing to post up. Never mind then.

Oh yea, :D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D

:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D

:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D

:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D

Link to comment
Share on other sites

  • 3 weeks later...

Hi everybody,

I know I might be bugging some of you already with this topic but I uploaded an example of how a water surface can be done (thanks to my friend "Gustav" at clickteam-forum).

Unfortunately I don't know how to resize the water surface to give it the exact effect like in hydrocity.

My friend "LarkSS" (in this forum) has created an example of how to resize the overlay but we haven't got it to work yet in combination with this example.

Can anybody help please?!

hydrocity.mfa

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...