How do I make my Sprite follow a line automatically?

  • Hi!

    New user here, need some help making a game for the first time. I've looked through a long list of "How do I FAQ ()" forum posts, but haven't seen any solution to my idea.

    I am going to make a game where you have three straight lines, where you can jump from them by using the left and right arrow keys. The game is going to be a top-down view game, where you are controlling the main object to dodge incoming traps and so by switching the line you are on. Basically a kind of mix of Subway Surfers and Borderline - Life on the Line game. Here are the games if you do not know them:

    Borderline - Life on the Line: Subway Surfers: So, how do I make the main object/sprite automatically follow on the three lines in a consistent speed all the way through? I don't want an ending point of the game, just a endless automatically selfwalking object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could simply make the lines an infinite scrolling, and so the actual main object doesn't move, the scenery/line does.

    If You already know the 3 possible positions for the main object, and can very well have it lerping between those positions on user's input.

    If the lines are supposed to change orientation and possibly cross over one another, have the main object change angle according to the line's angle and have it move/lerp between two imagepoints of the line, one at start and one other at the end.

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