It should not be surprising that in our age of artificial realities (starting from movies to video games to VR) people are contemplating the possibility that the "real" world is also an illusion, or a simulation akin to the "Matrix". But have any of the ancient philosophers seriously contemplated this idea. If so, who were they, how well accepted/developed these ideas got, and what were the precursors to these ideas coming forth? (to the later point, the obvious answer would be dreams, but perhaps there was something else?) I'm aware that some religions posit that the universe is a just a dream of a deity (Hinduism?) but for a long time these views would be localized to the culture practicing such religion, and I'd be curious to see if any philosophers outside of such cultures developed this idea.
Hey, come on over to /r/askphilosophy if you would like an in depth philosophical answer that details the ideas proposed on this subject from antiquity!