I would like to make a level of, let's say, 10 000 pixels wide frame with physics ground objects. The problem is that there seems to be too many of ground objects as things slow down quite drastically.
Is there any workaround that would allow this with good performance?
I tried to create the physics ground objects at runtime based on player position, so that the number of ground objects would stay very low regardless of frame size, but that didn't work (should it?). The created ground objects did not have any effect on the player.
3000 pixels wide frame with ground objects is still ok performance-wise. I was thinking of setting the virtual width to -1 and wrapping the layer horizontally so that the same terrain would repeat 3 times (~10 000 pixels in total). However, wrapping did not take into account the physics ground objects, and my player fell through the background immediately when the layer repeated.
Thoughts?