Zelda Scrolling

This forum is currently in read-only mode.
0 favourites
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • I whipped together a little zelda scrolling example. I'm betting someone could bust this down into 2 events instead of 5... Heck, now that I think of it, I bet someone could even make this 1 event. While I'd like to see that out of curiousity, here it is, in all 5 events of granduer. 1 and 2 event would really push the bounds of 'human readable'.

    I had to make this for a friend. so I figured I'd share.

    http://kayin.pyoko.org/zeldascrolling.cap

  • That's pretty cool

    Can't wait to see a zelda game made with construct

  • I'm digging the math.

    an understanding of math always makes for an interesting scirra member

    if you didn't know

    there are DisplayWidth, and DisplayHeight expressions

    to keep you from having to type in the numbers manually

    and make it more flexible

    they can be found in system

  • Do you really need timescale?

  • he's future proofing it

    it if there were things moving around

    the timescale would be needed I'd say

    for zelda type scrolling

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't really see the point. So what if objects are still moving while the screen is scrolling? It only takes a second or so to scroll. Besides that you'll need to add another event to deal with time scale freezing when you get to the bottom, or the right side.

  • I did the zelda style scrolling in one event hehe

    I think we need a new system expression which is similar to clamp and similar to lerp. I need a name for it...but basically you give it a value, another value, and the amount to move the first value towards the second value...

    so it's like this:

    return source + clamp(destination - source, -dist, +dist)

    hmm...

    one disadvantage to my system is it doesn't pause the game

  • Did the original pause during scrolling?

  • yeah it does

  • I did the zelda style scrolling in one event hehe

    I think we need a new system expression which is similar to clamp and similar to lerp. I need a name for it...but basically you give it a value, another value, and the amount to move the first value towards the second value...

    so it's like this:

    return source + clamp(destination - source, -dist, +dist)

    Clerp?.. no wait Clarp!

  • I don't really see the point. So what if objects are still moving while the screen is scrolling?

    Because that's how LoZ does it, and this is an example of LoZ style scrolling.

  • Well adding an extra event, and then taking advantage of the time it takes to go from float to int gave me something like this:

    System: 0 ScrollY + clamp(DisplayHeight / 2 + floor(Sprite 0 .Y / DisplayHeight) * DisplayHeight - ScrollY, 0 -timedelta * DisplayHeight, timedelta * DisplayHeight) Different to ScrollY
    System:   OR
    System: 0 ScrollX Different to ScrollX + clamp(DisplayWidth / 2 + floor(Sprite 0 .X / DisplayWidth) * DisplayWidth - ScrollX, 0 -timedelta * DisplayWidth, timedelta * DisplayWidth)
    

    SystemSet time scale to 0[/code:3aw0i21o]

    You still need to turn off bounded scrolling, or you'll get that bug at the end, bet ehh add a solid wall there.

    You should be able to use time scale in the always event somehow, but Im not seeing it. Clamp is about the only usable function, but getting the numbers right is a pain.

  • Yeah, the timescale event is just to emulate LOZ style scrolling. It's not critical but it matches the style.

    I love the 1 event solution, David. That was way simpler then what I thought was necessary.

  • Can you post a .capx? I can't use the file you've posted up there, so I have no idea what you guys are talking about. <img src="smileys/smiley9.gif" border="0" align="middle" />

  • dpyellow

    This thread is over 4 years old.

    Also, this is the section for Construct Classic and the files are not usable in Construct 2. Therefore there is no .capx.

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