an example of scroll, scale and parallax

0 favourites
  • 13 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • 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! <img src="smileys/smiley1.gif" border="0" align="middle">

    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

  • If the player has the "scroll to" behavior it will stil work?

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Vtrix. Thank you. This is much better than the ScrollTo.

  • THNX for sharing...it`s a big help for me!

  • 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?

  • 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 :)

  • 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! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Thank so much, It's very awesome !!! ... ^^

  • Wow this is freakin awesome !! Thanks Guys.. Ideas are starting to rumble

  • Scroll To: Button Trigger

    Thanks Vtrix!!

    I re-appropriated the code so when you press the 'scrollstart' object the camera scrolls to the destination (player) instead of automatically scrolling :D

    Iv also made the animated 'player' into a button, so I can return to the start.

    I have a problem: I can only press the 'scrollstart' object once. When I press the object for the 2nd time nothing happens. Why doesn't the Boolean function reset so you can activate the button again? ...I'll have another tinker!

    Demo

    Capx

  • I know that this is an almost 4 year topic but it was listed under:

    Neither the link to the example or the demo work

  • i think they made changes to dropbox, which is pretty annoying for old links

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)