Hi!
You probably are familiar with the endless runner games, except when I take a look at the sample capx from Scirra, I notice that this game doesn't let you control your player. So it's using a set speed with a set obstacle speed.
Now I'm wanting the player (car) to be able to drive left and right, finish a stage and then have another stage spawn after it.
Problem is... I can't figure out how to adapt the endless runner sample nor am I able to get some of my ideas to work. Since the layout width isn't endless, I have to come up with something that will relocate the player back to a starting point when it reaches an end point:
------StartPoint---------------------------------EndPoint-------
And I would set the sprite (ground/stage) to a new random frame so it will create a new stage. The car and ground both have physics. Problem with the relocate idea is that it didn't 'remember' the speed it had at the endpoint. Upon relocation it would simply start at 0 speed again, I could use a solution for that!
Or if anyone has any other ideas to get this done efficiently. Basically the player can drive forwards and backwards. So I was thinking either I need to fix the relocation issue OR the ground would need to move in opposite direction when driving forwards or backwards. Now I tried and asked some stuff about that but couldn't get it to work without some weird occurences (like ground sprites miraculously falling from the sky at certain point).
Anyway, I'd like to thank anyway who might be able to help.