How do ghosts and dream bubbles work?

When you die, you wake up as a ghost in a dream bubble. The dream bubble’s environment can change according to the memories of the ghosts in the bubble.