Apocalypse is a popular topic of IF. Brian Moriarty’s Trinity explored the threat of nuclear annihilation, back in 1986; Phantom Williams’ 500 Apocalypses got several mentions here last year, from me and from Philippa Warr. Max Kreminski’s Epitaph takes a more Spore-like approach, as you’re allowed to try to nurture procedurally generated civilizations to survive longer than a few turns, and instead (most likely) rack up an impressive collection of failures.
Whatever kind of apocalypse you’re trying to model, interactive fiction probably has something to offer. Here are some of the most interesting.