[quote:d1syx27o]I think the best thing to try at this point is to have the line pieces also spawn the new lines from themselves. I think then, I wont have to worry about lines separating over time.
The problem is that it shouldn't matter from what I can see, the problem occurs as the speed get to high. The way you have already done it with the custom movement is as far as I know the most basic way of doing it. Meaning that you simply apply the same speed to all objects and checking the debugger and the different lines, it does indicate that they are all in fact moving at the same speed. And that the problem happens within a very few ticks, maybe 1 or 2 I would guess. So exactly where and why it goes wrong im not sure. But if the most basic way of doing it doesn't work. I cant see how adding more complexity will help. And its not a consistent problem, some of them works fine, and doesn't seem to be linked to any specific lines, but just random ones at random times, but definitely as the speed increases it becomes more and more. I have checked the imagepoints to see if it could have been one of them that was off, but that doesn't seem to be the case. But I would like to know the solution as well. But at the moment I don't have time to try to solve it as im not really sure where the problem is in the first place.
My guess as to the problem. Is like you said, over time the way speed works causes this separation. However I think it becomes an issue because the spawn rate is determined when an object gets destroyed. As things get faster, they might hit or detect a collision with the "end line" later or further away than they should.
I did an experiment. Destroy the lines when they exit the layout. This actually made some decent improvements. It took much longer for the issue to occur. I think this is because the detection for leaving the layout is more efficient and accurate than the collision check.
So I believe because when speed goes faster it moves more pixels at a time. That means that eventually it will move a large amount before getting destroyed(the collision would be in the middle of the object) and consequently make the next piece spawn with that gap.(when an object is destroyed a new one is made).
I don't actually find speed to have a problem keeping up necessarily. If you notice, even with the gap. Objects move the same speed and that gap stays consistent as it grows.(I am also using 144hz monitors which let me see this gap pretty clearly as it moves)
My new theory and I would go as far as a solution removes the possibility of this gap altogether. If each line segment is capable of spawning a line on itself, there can never be a gap.
At least I think that makes sense enough