How do I Set up a temple run-esque system?

0 favourites
  • 2 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • I am making a variation of flappy bird, but I wish to implement a system that you gain a little bit of speed for each pipe you get through, and lose speed if you hit a pipe, eventually to be caught by something if you lose enough speed. I have no idea where to start with this process, so help is greatly appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all, there is an example in Construct called "Template: Auto Runner" that can show you a way to do the constant scrolling with randomly placed obstacles.

    As for speeding up when passing a pipe, you just need to check the players current x (for horizontal movement of course) position against the x position of each pipe every tick. Then each time a pipes position goes from greater than the player to less than, increment the speed variable for the player. If you are destroying the pipes when they leave the screen, checking all pipes should not affect performance.

    Of course, slowing down would just take an on collision test. You would just need to remember not to speed up after passing the pipe the player collided with.

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