Thanks that you like it!
The idea is a result torakumsama’s request for help on “multi-scene synchronization”.
The basic idea is following:
Green - is overlay
Red - is background
Both have a floor at the same position, with the same size and orientation, but one is green and one is red.
Both have a camera at the same position, with the same size and orientation, but the green scene camera ends at lets say 7 BUs while the red one ends at 100 BUs.
Both have a cube at the same position, with the same size and orientation, but one is green and one is red. Finally the position, orientation and size does not really matter. Both cubes are ghosts.
Both have an invisible cube “master” as rigid body. Only one of them is active. The BGE starts with the green one. At each frame the position, orientation and size of the active master is translated to the coordinates to each scene. Here it is simple as the cameras are at the same position, orientation, scale. This means the cubes move synchron. You wouldn’t see the red cube if the camera of the green scene could see further. This is because the green cube always hides the red one. But behind the green camera’s far clipping distance the green cube is cut out and not rendered. So the red one is visible ;).
When the green master hits an invisible portal the reds master gets activated.
When the red master hits an invisible portal the green master gets activated.
Both portals are at different position to prevent portal flipping.