Hi,
I hope these instructions will be clear. It is more complicated to write it than it is to do it.
Start by making two duplicates of your video, and work with the duplicates.
The procedure then would be to put Duplicate 1 on your desktop. Open it but don’t play it. Then, open Quicktime Player and in the Quicktime menu, do a File/New Screen Recording. A little box will pop up with a red dot in it. Click on the little v next to the dot and select Internal Microphone (if your video has sound) in the little drop down menu. Then Click on the red dot. Instructions will pop up giving you the option to drag-select the portion of the screen that you want to record, excluding the rest. Drag- select over the Duplicate 1 clip to outline one of the two game components. After you drag-select the portion of the clip, a box will pop up that says "Start Recording". Click on that, and immediately start playing the Duplicate 1 clip. Quicktime will record the selected portion of the clip as it plays. When the recording is finished, click on the little stop icon in the menu bar at the top of your screen (the one that is a circle with a black square in it). A .mov file will pop up. Save that to your desktop. You now have converted the Duplicate 1 clip to a .mov file that contains only the selected component of the video game, without background. You can drag the .mov into iMovie.
Follow the same procedure for Duplicate 2, only this time drag-selecting the other component of the game.
Now you have two .mov files, each containing one component of the video game without background. Drag one into an iMovie project that contains the custom background that you have made. Use the Picture in Picture feature to overlay that component onto your custom background, adjusting the size and position as desired. Share it out as a File to your desktop. Then re-import the shared file into another newly created iMovie project. Drag the second game component clip into the new project. As before, use the Picture in Picture feature to overlay it on the previously shared out clip. Then you can share out that project as a file to your desktop and you will have your video game components playing on your custom background.
-- Rich