It was at the end of a slightly longer dream, not too long since I had just woken up, looked at the time, and somehow managed to go back to sleep. I'm guessing this lack of a 'deep sleep' is also why it was so hard to follow, even by my dream-standards.
The whole thing involved videogames, or rather it was a videogame, but very muddled... earlier in the dream I had been playing a game, some sort of 1st person RPG (yeah I've been playing a lot of Fallout, but I think this was a lot more character/dialogue-driven, almost like some sort of intricate adventure game) which I had apparently played before.
A piece of dialogue happened in some sort of office/classroom, and then I walked over to a desk to talk to the... person working at it, since I had meta-knowledge telling me that would be best to advance/succeed in the game's story. She looked like some strange mix of Rex from Toy Story (you know, the green dinosaur toy?) and a young human woman with an eccentric mode of dress.
Looking over her shoulder I saw she was designing some sort of scene, a settlement in a jungle, on her computer screen.
It is hard to say if this 'settlement builder' part was inspired more by Fallout 4 or Dwarf Fortress, since I have been playing a lot of both recently. Oh, and for added weirdness the dino-woman's voice/personality seemed to be based off one of my IRL nieces.
She showed me how she planned on adding a mirrored version of the background foliage for players/viewers (I'm not really sure if it was a game she was playing/designing or some sort of 3d scene) to see if they looked at a reflective surface, which seemed like kind of a pointless detail.
Then she was trying to decide where to place a structure, a sort of miniature version of the ancient Sphinx.
As she was scrolling around trying to find somewhere where it wouldn't be too obtrusive I saw more of her budding settlement (okay I guess it was a game) and then she eventually placed it in some bushes/reeds between a couple of buildings.
At this point the dream got even more muddled. She was showing me some of her villagers/whatever, I think they were a bunch of post-apoc survivors or some such nonsense, but then they sort of shifted into various historical figures and she sort of disappeared from the dream, as did the earlier scene. I was now entirely immersed in this new scene, of these characters, dressed as old-time baseball players and running around a baseball diamond. Except some of them weren't actually there, because they had died years before? I think I was watching this scene in some video, or having someone describe it to me. Perhaps I was reading a book. I believe they were actually a part of some kind of book tour, bizarrely enough.
Anyway, from there it sort of started telling the story of these 'starry vecks' (I think the sudden onslaught of old authors probably had something to do with reading some of the notes on A Clockwork Orange the other day) and what they'd gotten up to. At this point I can't tell if the dream is actually set in old times or if it's still some Fallout-style apocalypse with a bunch of future-tech floating around in a wasteland.
Shortly it settled on the story of this one guy, I think he had been a doctor as well as a writer?
Anyway, my narrator described how he'd been a bit wild earlier in life, doing heroin in some sort of frontier-place, but had pulled himself together and really managed to help a lot of people later on before he died. This guy was certainly very highly-regarded by whoever was telling the story (I have no idea).
Then I saw the scene of his death, some small upstairs room with wooden walls.
I'm can't remember quite how he died (I think he lived to a ripe old age) but the guy was just sprawled unrealistically on/next to the bed in the room, much like dead people in Fallout 4. At this point the dream sorta lost its chain of thought again.
Now I think I was watching footage of some game, multiplayer, possibly some sort of MMO.
Apparently the house where that dead dude was was being used now as a base by a player, and my perspective was of someone who had just broken in/entered somehow. This guy was some sort of griefer and started smashing shit up and looted (FO4-style) the corpse on the bed (who had been sort-of preserved there as part of an intact shrine, let's just say he was embalmed or something for realism's sake) before running downstairs.
There was a brief scuffle and the invader stabbed at the 'owner' of the house a few times (seemingly not aiming to kill, but to scare or injure, perhaps just wildly lashing out?) before running upstairs and trying to escape by throwing themselves repeatedly into a partly-broken wooden wall (this was all still first-person), then again as more of it broke away, and then finally there was enough room for them to fling themselves out into empty space and crunch on the ground.
I think that guy died there, and then I was reading a description of the events and their madness, presumably online (it was still footage of some videogame at this point, I believe, although they were now a written character rather than some random online griefer). It described how they had been insane and slowly deteriorating, can't remember the details but it was pretty chilling stuff.
Then I went (I'm not sure if I said this to someone watching it with me, if I posted it on a forum- probably this one- or if I just thought it), "This would be far scarier if it was told first person, if he had survived and was giving an account of it all firsthand,*" and suddenly the dream ran with that idea.
Now it showed the madman lying in a hospital bed, badly injured but in more pain from his inner demons.
He writhed around, telling the viewer how he was tormented from within, how he had no control over the things he'd done. It showed his face, a bit mangled and seemingly afflicted by disease, and his broken body, and a grimace of pain and misery twisting his features. He described (his voice was pretty deranged, as you may imagine) how he felt and what was going on in his head (Can't remember details but I guess it was either schizophrenia or legit demonic possession- I think it may have been the latter) and how there was less-and-less of him left in there all the time, how he barely saw the people who visited him in hospital through the terrible visions he saw all the time, and how his nightmares even began to spread to those around him.
Then the dream turned first-person again, with all the horror that involved, and suddenly for a brief moment as his/my eyes opened to see my orange bedsheets and my room it was as though I was him. I was shaking in terror for anywhere from one to several seconds, I don't know, but then I finally shook it off and woke up properly.
I suppose it was some form of sleep paralysis that caused that last bit, no doubt coupled with some weirdness to do with my sleep pattern- I've been trying to fix it lately and that usually gives me nightmares, although usually not on the third night of the attempt- and the fact that I had woken up briefly and gone back into a light sleep. It only really got nightmarish at the very end, although I suppose that's par for the course with most scary dreams. It probably didn't help that I hadn't had much sleep due to staying up, either.