0 Favourites

Forced-Scrolling Platformer Questions [RESOLVED]

This forum is currently in read-only mode.
  • .CAP

    dl.dropbox.com/u/29072735/forcedscrollplat_test.cap

    I am fiddling around, trying to make a forced-scrolling platformer level, much like how you see in

    Subscribe to Construct videos now

    . Or more accurately,

    Subscribe to Construct videos now

    Above is my test .cap, and I have some questions on implementing some processes:

    1) Border Death:

    In the .cap I have some events set up to where if the player is at the edge of the screen, and is caught between the edge (BorderKill) and a solid, the player is crushed.

    I have set up what I thought might work, but the player still goes through the solid.

    What I have:

    System>Compare Values

    If

    player.XLeftEdge = BorderKill.XRightEdge

    playerXRightEdge = Ground.XLeftEdge

    Set Global.Death = 1

    Is there a better way to do this? Using dummy sprites? Any advice would be appreciated!

    2)Checkpoint Respawn

    In the test CAP, I have it so that when you die, the system picks the closes checkpoint spawn to the KillBorder. I assume this would be the most efficient and easiest way to handle checkpoint respawning.

    3) Player Speed

    I would like a consistent player speed as he is moving to and fro. Right now it seems that moving against the scrolling makes the player move slower, whilst moving with it makes him go faster (obvious enough).

    I have tinkered with a few ways to get consistent speed no matter which direction the player is moving in. Namely the toggled event in "Camera" Event Sheet:

    player: Set X to player.X + (global('ScrollSpeed')*timedelta)

    Untoggling that option gives what I feel is much smoother movement, with the trade-off being that the player is ALWAYS moving (which I would think would make platforming difficult). When I had this system set up I would have an event like

    "Move Left" is down:

    Player: Set Player.X to Player.X - (PlayerValue(Speed)*timedelta)

    Which would violently fling the player to the right, regardless of whether it was adding Value'Speed' or subtracting Value'Speed' Which is confusing. This configuration worked fine with my forced-scrolling shmup engine, so I can't quite isolate the factor here that's causing the problems.

    I am not especially looking for answers here, but feedback and ideas.

    Any help would be appreciated!

    -Ing

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Thank you for the example; it pointed me in the right direction - as is usually the case, the simplest method is the preferred one. I wouldn't have thought to use Unique IDs!

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