As for the random generation, each set of barriers is part of the same sprite, and the way it looks is randomized at the start.