Hi guys!
I'm developing an educational Endless Runner whose character is always standing in the same position with the running animation active. In the background there are layers with Parallax effect to simulate movement (image 1 below).
There are only two obstacles, randomly generated: boxes and drones. Colliding with the box takes it to the left corner, and you can jump over it or walk over it whenever you want.
I created a simple routine that automatically places the character in the original position (x=280) (image 2 below). However, the routine below still doesn't work perfectly, making her stand still on a moving box or be teleported abruptly forward.
I have two doubts:
1. What's the best routine to spawn the drones within a given area on the Y-axis (without making the drones spawn just above the screen).
2. What do you suggest to perfect the box routine (bump and walk on it)?
Thank you in advance for your attention and collaboration.
Image 1
Image 2