Code:
Problem description:I'm sure you've heard of the android game called 'flappy bird.' In the game, they have randomly generated tunnels and its always different.
I don't even have a clue on where to start lol.
I haven't played flappy bird but I would think you would check if the wall hit the x.min og the map and if so del the wall or remove it from map
|
So I have a obj spawning a /object/tunnel.
Then the tunnel obj will create more pipes.. How can I make it so these pipes the tunnel just created are apart of the tunnel. Such as, the pipes move with the the tunnel and if you bump the pipe the whole tunnel stops also. Should I make it one big icon? _> |
When you create the pipes from the tunnel, you simply need a way to reference back and forth...
tunnel Now, whenever someone runs into a pipe, you have a way to tell the whole tunnel to stop. Apply this principle on a larger scale if you want a tunnel to contain more than just pipes. |
Anyway, I think the trick here is to move the map horizontally, not the player.
Generating pipes is a matter of creating walls periodically, leaving a hole to fit through. Then, as I said above, you'd move the walls every frame until they fall off the other side of the map.