Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I don't know how that can be done, the iPhone is a single app at a time. Any app that is not running, can only do alerts or Pushes. To make an app that 'sleeps' and records then you run a game app, just don't think it'll work.

Great idea thou...
If there were true multi-tasking that might work, Apple is kinda strick about what an app can and can't do.
 
If you're jailbroken there's an app in Cydia called Display Recorder. Pretty sure it does what you're looking for. Think it's $5
 
No regular AppStore app can do that.

But if you just need a screenshot you can press both home and lock button at the same time and the screenshot is saved into your device photo library.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.