You said you only want to do this the first time they exit - is this because you know it's annoying and don't want to annoy them? Consider that thought when making the decision how to approach this.
Let's review the purpose of your advertisement: do you want more downloads? More purchases? More exposure? More positive exposure? And is this end-of-game ad going to make that happen for you?
What you're describing isn't much different than those "on-close" nag screens that are like "Are you SURE you want to leave this page?" Yes, I'm sure. I clicked close, didn't I?
Instead, you'll want to make your advertisement happen on YOUR turf. How big is your game? If it's reasonably big, you could probably justify a five or ten second ad while you "save settings". Put a little bar at the bottom showing the "progress of the save" and conveniently show a small ad above the progress bar. "If you liked this, check out _____". If you make it more than a few seconds, though, you'll find it have a higher cost (in terms of negative exposure) than you have benefit (in terms of checking out new games).
To make it seem like you're not advertising show much, mix it in every once in a while with tips (did you know you can open your inventory with CTRL+I from any menu?) or stats (your most accurate weapon is the Shotgun with a 85% hit rate! Well done!) to spice things up.
Our culture, especially gamer culture, is to abhor advertising in all its forms. We want to block it and ignore it whenever possible even if that advertising is something we're likely to enjoy. Thus, to keep the exposure from this advertising positive, it has to feel natural and welcome. Ironically, that usually means tricking someone into looking at it.
tl;dr
- Make a loading or saving screen to display your ad.
- Don't flood the screen with ads, make it have other content too.
- Don't abuse the space with ads that are not likely to be successful.
- Make your user enjoy the ad as much as they enjoy the game.
finish
button. </userstory>software designed to interfere with a computer's normal functioning