Make an object scroll on the spot?

0 favourites
  • 9 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hi all,

    I was just wondering if it was possible to make an object scroll on the spot - into itself (incase i did a terrible job of explaining, ill show you with a picture!).

    <img src="http://dl.dropbox.com/u/13312935/example3.png" border="0" />

    I want the platform to stay in place - yet scroll into itself as to give the effect that the arrows are moving.

    I can achieve this through an animation - though it seems like something that should be possible through events.

    Anyone have any ideas? (Greatly appreciated if so!)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Traditionally that would be done with an animation. In this particular example you'd need just a single arrow animation and could place three next to each other.

    There are ways to do it with events and some extra sprites but that would be more work and harder to debug.

  • Thanks for the response Cross,

    Thats unfortunate - The current way to achieve a simple *continuous* scrolling background is a bit involved.

    (Edit: This is not actually true, You can do it in one simple event)

    I wonder if this is on the to do list (if it is its probably in the unimportant section).

    Even if I did put 3 blocks together, unless the block exits the layout there wouldnt be a way for me the get it back in place would there?

    (I only found 1 example of a continuous scrolling background - using two images, i played around with it but i couldnt get the image to appear half way into the screen for instance, it always needed to exit and enter from the edge of the layout).

  • What exactly are you trying to achive? Maybe you can post your CAPX?!

  • Hi Weishaupt, there is no example capx yet because im trying to figure out the best way to do this:

    Im adding effects to my scrolling platformer, in the beggining there is a patch of water, i would like to give it a bit of (cheap) animation so its not so static.

    (The platform in my original post represents the water, i would like the image to constantly move in one direction and repeat itself, but staying in the same position while doing so).

    I do know how to achieve this (effect) with an animation but it would means i have to use sprites - pretty big one(s) at that, i think im pushing performance as it is.

    Im thinking of trying the solution posted here: scirra.com/forum/continuous-scrolling-background-from-parts_topic48041.html

    And then possibly using a layer to mask the areas that there is no water. It just seems excessive for what im trying to do. :/

    Thoughts?

  • So, what you are saying is, that you want to create a side2side scroller where the Avatar stays in the middle of the screen?

  • scirra.com/forum/infinitely-scrolling-background_topic38454.html

    Here is a similar post to what im trying to achieve.

    The only difference is - im trying to do it on a smaller scale. This guy wants his background to be scrolling regardless of whether he is moving or not.

    I want the water to be scrolling regardless of whether i move - like watching a waterfall. This water doesnt take up the entire layout - in fact only a small portion, so using a strategy that loops once it exits the layout is not efficient. I need it to loop before it reaches the end of the layout.

    Im looking for a video to show an example.

    (That post talks about "offset" as a possible solution - i have to find out what that is, manual time).

  • The best way to do that kind of thing is texture scrolling. This method is used in some 3D game to fake conveyor belt, waterfall, and stuff like that.

    And it's should be possible with a modified tiledbg plugin. But I prefer to wait for the official tiledbg plugin to evolve. I think a fork in plugins is too messy.

    So maybe it can be a suggestion for Ash.

  • Offset is not in c2 it seems.

    Thanks for your time guys, I guess im going to have to come up with another cheap way to give the water some life.

    Ill post it in the suggestions for what its worth.

    (Edit: follow here if interested)

    scirra.com/forum/suggestion-for-continuous-scrolling_topic48238.html

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