It was a costume Chinese drama. In the scene I remember, there was a mechanism operating in a desert-like place, pulling the characters inside. To escape, they had to figure out how the mechanism worked. It felt like a vast void of space and time. Occasionally, the characters would come together in pairs or groups of three, then find themselves alone again. Somehow, they managed to understand how the system worked and eventually escaped.