It was the other way around. Throughout the entire game you know you're basically playing his dream but then he realizes they actually exist in a different world. Or some weird shit like that.
The story kind of goes off the deep end late game but the battle system actually gets better and better as the game goes on.