an example of scroll, scale and parallax

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply
Author
4,440 Rep
Post Options Post Options   Quote vtrix Quote  Post ReplyReply Direct Link To This Post Topic: an example of scroll, scale and parallax
    Posted: 10 Nov 2011 at 6:02pm
Hi i made this example

demo

capx


its got easing of scroll, scale, and parallax with 2 layers

it also has a follow scroll and at the end the scroll is fixed on the player with platform movement

i think a lot of people are wondering how these things work so i hope this helps!

note:

lerp(layoutscale,1,0.5*dt)

how this lerp works?:
layoutscale = current scale
1 = target scale
0.5*dt = is how fast it will go from current to target, larger is faster

Back to Top
2,698 Rep
Post Options Post Options   Quote AngeloFernandes Quote  Post ReplyReply Direct Link To This Post Posted: 10 Nov 2011 at 8:18pm
If the player has the "scroll to" behavior it will stil work?
"Everything is amazing and nobody is happy."
Louis C.K.
Back to Top
4,440 Rep
Post Options Post Options   Quote vtrix Quote  Post ReplyReply Direct Link To This Post Posted: 10 Nov 2011 at 10:36pm
i think it interferes with it so i dont use the scroll to behavior because you dont have control over it, maybe later if the behavior is extended, for now i think this is the best way so you can switch scrolls on and off
Back to Top
2,156 Rep
Post Options Post Options   Quote TastyBytes Quote  Post ReplyReply Direct Link To This Post Posted: 17 Nov 2011 at 12:21pm
Vtrix. Thank you. This is much better than the ScrollTo.
Back to Top
2,701 Rep
Post Options Post Options   Quote dformer Quote  Post ReplyReply Direct Link To This Post Posted: 20 Dec 2011 at 8:04pm
THNX for sharing...it`s a big help for me!
Back to Top
233 Rep
Post Options Post Options   Quote larrimo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 2012 at 10:47pm
Question regarding this:

I'm making a vertical scroller, (player starts at the bottom and moves to the top, shooting his way through for power ups etc)

I want the 'level' to be small width, but of course a long length. Is it advised to use layout properties of example: 1024x10000?

Or will a size like that hurt my framerate etc? I know i can probably set the objects to not be created until the player gets to a certain point on the map.

Also, as with all vertical scrollers, once the level has scrolled passed the bottom of the screen, the player cannot return (if they miss a power up, that's it... no going back)

How do i implement something like this?
Back to Top
4,440 Rep
Post Options Post Options   Quote vtrix Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 2012 at 6:32pm
i created something like that in classic, a doodlejump clone :) but it created it totally random, i made it spawn a platform on a counterinterval only when the platformcount was lower then a certain number, so i knew there where only so much objects in the game constantly, and ( also destroyed them when too far from the player, i dont know how far you can go with a premade level, i also thought of some kind of levelblocks that where randomly put together, so you have a premade levels but still some randomness , but never implemented :)

Edited by vtrix - 14 Feb 2012 at 6:33pm
Back to Top
4,407 Rep
Post Options Post Options   Quote SullyTheStrange Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 2012 at 6:59pm
Very nice example, it's a much more interesting scrolling effect than ScrollTo. My only problem is that once it's on the player and the player's running around, it takes too long to catch up to him. For anyone who wants to change that: I changed the 0.8*dt in both of the "Scroll to" lerp actions to 2*dt instead and it's a lot faster.

Other than that, great job!
All's fair in love and war, kid.
Back to Top
413 Rep
Post Options Post Options   Quote areisv Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2012 at 6:05am
Thank so much, It's very awesome !!! ... ^^
Back to Top
743 Rep
Post Options Post Options   Quote ronfeli Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2012 at 6:03am
Wow this is freakin awesome !! Thanks Guys.. Ideas are starting to rumble
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down