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

Get help using Construct 2

Post » Tue Apr 22, 2014 5:12 pm

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.
B
3
Posts: 5
Reputation: 187

Post » Tue Apr 22, 2014 8:47 pm

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.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests