The lights are on
Poorly written, is somewhat of a loose term. As a writer, I can definitely attest to any "headaches" the game writers may have had when merging the player's many, and often various, in-game decisions. After writing so many branching dialogue paths, it can seem overwhelming, and not confronting the players with the ramifications of their in-game directives, can sometimes seem as though the writer was asleep at the wheel. Speaking strictly about the story, I think that Heavy Rain was cleverly written; it imbues a sense of thrill and mystery that many titles of that genre fail to do.