Endless loop scrolling wrap layout?

0 favourites
  • 11 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies.
  • On Sonic the Hedgehog 1 for the Genesis, there is a part on one of the labyrinth levels where the level wraps around until you throw a switch, and on Mario (3 I think?) there is a similar trick on a Bowser level and you have to pick the right path or else the game beeps and you wrap around the layout. How can this be achieved in c2? It's not quite as simple as resetting the player position as there are no strange jumps. Any ideas what tech could be used to do this trick?

  • The two ways I've used to do that are either:

    * move the player if he exits either end of layout. Scrolling is unbounded and the seam is hidden by either carefully placing objects in the same places on either end or using the paster object to copy the other side. It just to make the transition appear seamless.

    * move everything under the player instead of the player. And just wrap the pieces as the leave the layout.

    Both those take care of the visual portion. The seam will be a problem with ai and such so you'll have to take that into consideration with your events.

  • I used the first method R0J0hound mentioned for a 1-hour game jam entry:

    https://dl.dropboxusercontent.com/u/523 ... eMaze.capx (you'll need his Paster plugin)

    It uses a Level Bounds sprite, definining the world wrap seams, & 8 paster objects around it. In retrospect you'd only need one, looping around the 8 positions - you don't get much time to think in a 1HGJ!

  • The two ways I've used to do that are either:

    * move the player if he exits either end of layout. Scrolling is unbounded and the seam is hidden by either carefully placing objects in the same places on either end or using the paster object to copy the other side. It just to make the transition appear seamless.

    * move everything under the player instead of the player. And just wrap the pieces as the leave the layout.

    Both those take care of the visual portion. The seam will be a problem with ai and such so you'll have to take that into consideration with your events.

    I think the first method makes sense, if unbounded scroll is trigger-able, so when your reach that part of the level it turns bounding off, then you could proceed with the section that wraps. As so matching AI, I don't think either of my examples need that:

    https://youtu.be/QcfyypW65BM?t=24

    https://youtu.be/s-J3M33cDNw?t=8

    Neither have anything that would be different on a wrap, so I think it could be done that way. Would use paster be essential or could it be done with creative triggering?

  • > The seam is hidden by either carefully placing objects in the same places on either end or using the paster object to copy the other side. It just to make the transition appear seamless.

    >

    >

    Would use paster be essential or could it be done with creative triggering?

    Did you really read the answer?

  • >

    > > The seam is hidden by either carefully placing objects in the same places on either end or using the paster object to copy the other side. It just to make the transition appear seamless.

    > >

    > >

    >

    > Would use paster be essential or could it be done with creative triggering?

    >

    Did you really read the answer?

    Of course I did, I was just clarifying that it could be done without paster, I must have read the or as an and.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Zebbi

    To do it without the paster object just make sure the areas on either side of the layout look identical.

    https://www.dropbox.com/s/hds0a0y1woh6q ... .capx?dl=1

    /examples31/loopScroll.capx

  • Zebbi

    To do it without the paster object just make sure the areas on either side of the layout look identical.

    https://dl.dropboxusercontent.com/u/542 ... croll.capx

    Thanks, that's a perfect example!

  • Zebbi

    To do it without the paster object just make sure the areas on either side of the layout look identical.

    https://dl.dropboxusercontent.com/u/542 ... croll.capx

    can you reupload that? thankyou

  • > Zebbi

    > To do it without the paster object just make sure the areas on either side of the layout look identical.

    > https://dl.dropboxusercontent.com/u/542 ... croll.capx

    >

    can you reupload that? thankyou

    If r0j0 doesn't, I'll see if I still have the capx on my laptop later...

  • orangpelupa

    link updated

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