Actually this is not
"an M. Night Shyamalan film" in the sense you mean, because this time he's not the main writer or the one who conceived the project. The original script was by Gary Whitta, a video-game writer/designer who also wrote the screenplay for The Book of Eli
. Shyamalan did a rewrite, followed by a polish by Stephen Gaghan (Traffic, Syriana
And we know it's not a simulation or a dream, because the film is one part of a multimedia franchise whose backstory "bible" was developed by comics/novel authors Peter David, Bob Greenberger, and Michael Jan Friedman. They didn't create the concept, but they were brought in to build the universe based on the movie's ideas, and the film script was rewritten on the basis of their bible. The three of them are doing a number of tie-ins that expand the film's universe, including several e-books and a prequel comic that are already available, and a novel and in-universe "survival guide" coming out soon (as well as a novelization by PAD).