21 March 2016 Last updated at 15:37 GMT
The pair were working on a new 'augmented-reality' programme called Project Sidekick that's designed to give mission control a better view of what's happening on the station.
Tim explained: "Sidekick creates a virtual-reality world on the International Space Station .... Ground control can come into our virtual world and we can use it for doing tasks together - for example the VR world can point out exactly what switches to flip or which screws to loosen, handles to turn and even guide us to storage locations."
After two hours of working on the project, they found the hidden Space Invaders game and were allowed to take a break and have some fun!
The special effects were added in later by the ESA.
The European Space Agency has shared footage of Tim with his former crew mate Scott Kelly fighting virtual aliens on the ISS, before Kelly returned to Earth earlier this month.