Concecpt for endless object; how?

Hi,

I would like to create an “endless” object. The player stays at one position and the scene always moves to the left. (in a 2d, top view game). The player should be in a tunnel (top half cut off). I can model a tunnel by myself, but it’s not endless. Besides, I would like to be able to have the tunnel’s postion change randomly in x and y.

Basically what I would like to do is to extrude the rightmost verticex of the tunnel to a new position and delete the leftmost ones (which are “out of screen”).

I do not have an idea how to implement something like this. Any hints on how to implement such a thing are very much appreciated.

Best regards
blackno666

take a look here can walk in y+ direction till you drop…

Cotaks,

thanks for your answer. I was aware that I could spawn new objects and thus create seemingly endless planes. My problem is that I want a deformed, bent (curved) tunnel to be endless (like an endless 2d bezier). The deformation should be random as well. The problem is that the tunnel needs to be mathematically continuous (the 1st derivative as well).

Maybe I can use straight segments and apply a lattice to deform (have many in stock an apply one randomly)… will look into this.

Thanks, anyway.

You could move the UV co-ordinates instead of the tunnel. Twist the tunnel, but don’t actually move it, instead your players movement through it moves the UV map, which repeats infinitely.

See BGMC24 | Inferno - DONE
It’s not a smooth bezier, but it is infinite. It follows a similar system except that it’s a tube. A script keeps track of where the player is and spawns new sections in front of them - making sure that it’s all aligned.

I did this with 1 huge mesh broken up into many quads

I used kdtree and the center of each face to get the vertex for each quad
(upbge does not have quads when you hit p)

when a face is used it’s popped into a list as a tuple (face, time)

when time runs out the alpha is zero and the face is ‘popped’ from the list and put back onto usable list.

so the whole sword trail is 1 drawcall / mesh

seach ‘Ninja slice demo’ in resources here.