This piece contains spoilers for Assassin's Creed Origins.

Assassin's Creed has always had fun with nested narratives. The modern-day sequences get a lot of stick, and fairly: they often feel like awkward and unnecessary interruptions to the historical adventuring which draws many of us to the series. But they do make explicit the series' ongoing fascination with themes of historical memory - how we think about and remember our collective past. It's baked into the idea of the Animus: where other series might have gone for time-travel or done without the contemporary frame-stories altogether, Assassin's Creed bases its nonsense McGuffin on the idea that historical experiences are encoded in our DNA. For much of the series, the historical portions were explicitly labelled not as areas or time-periods, but as memories.

These themes have always been part of the series but the most recent entry, Origins, takes them and runs. There's the modern-day frame-story and the mainly historical adventure, as usual, but within the ancient Egyptian setting the game is particularly interested in the still more distant past. Ancient Egypt isn't equal in its ancientness. Its greatest icons and the central image of the box art - the pyramids - were more ancient in the game's Ptolemaic setting than that period is to us. The game's fascinated by this. Ruins are everywhere, ancient tombs punctuate the landscape and the game itself, casting hero Bayek as a Croft- or Drake-style tomb raider. Your reward for clearing a tomb: a stele inscribed with hieroglyphs. 'Ancient writing,' says Bayek, a note of awe as well as satisfaction in his voice, 'from the Old Kingdom.' The idea of ancientness-beyond-ancientness is there for everyone to hear.

But there's another level, beyond this, and here be moderate spoilers, though they'll come as no surprise to long-term followers of the series. A few hours in, you delve deep into the Great Pyramid at Giza, and its Old Kingdom architecture gives way to still-more-ancient ruins, belonging, presumably, to the precursor civilisation that lies at the root of so much of Assassin's Creed's convoluted mythos.

It's a trope that's become familiar to the point of cliché, not just in games but in cinema and literature too: the technologically advanced civilisation lost to history, fallen from great heights of achievement before history was born to remember them. Sometimes they're human, like Tolkien's Númenor, but often they're something ineffably other: Bloodborne's not-quite-human Pthumerians, the High Elves of Tolkien and so many imitators, or aliens like Halo's Forerunners, Mass Effect's Protheans or the Engineers in Ridley Scott's Prometheus.

Pthumerian concept art, Bloodborne.

This cliché of modern sci-fi and fantasy is one deeply lodged in how we think about antiquity. This sense that things are somehow getting worse, that our distant ancestors were greater than us, their achievements more heroic. Already in the Archaic period of ancient Greece - six or seven centuries before the time Assassin's Creed Origins is set - the Greek poet Hesiod wrote of the glories of the first men:

"First of all the deathless gods who dwell on Olympos made a golden race of mortal men who lived in the time of Kronos when he was reigning in heaven. They lived like gods without sorrow of heart, remote and free from toil and grief: miserable age rested not on them ... they dwelt in ease and peace upon their lands with many good things, rich in flocks and loved by the blessed gods."

He goes on to describe successive ages, each worse than the last. The golden age is followed by silver, then bronze. The age of heroes is followed by Hesiod's own time, the age of iron, and soon, Hesiod is sure, even his generation of men will be destroyed by Zeus for their degeneracy. Similar sentiments are found in the Bible too: before the Flood humanity lived longer and achieved great things, hobnobbing with angels and giants before God destroyed them for their hubris and the degeneracy that had grown within human civilisation.

These mythological touchstones - and especially the Flood - are often alluded to modern precursor stories. Sometimes with a literal flood, like with Númenor; sometimes figuratively, as in Halo. Which brings us, inevitably, to Atlantis, the precursor civilisation which has left perhaps the most indelible mark on human culture. In all likelihood Plato made Atlantis up, a thought-experiment to make a point in his philosophical teaching, but it's since been taken up as truth by cranks, dreamers and mages of almost every stripe. Theosophists, for example, saw Atlantis and its Pacific counterpart Lemuria as inhabited by giant superhumans with powerful psychic abilities, and believed that many modern civilisations could trace their origins to these lost civilisations. These ideas - particularly their racial aspects - went on to influence Nazis such as Heinrich Himmler. Atlantis is no stranger to games but it's worth mentioning the original Tomb Raider in particular - a game that culminated in Atlantean precursors beneath a Great Pyramid. When Bayek slides down the flanks of the pyramids' in Assassin's Creed, the game's echoing Lara's slide down the Great Pyramid at the end of that seminal 3D adventure, a nod to Bayek's forebears within the history of video games as well as in 'real' history. Origins indeed.

So where do these precursor fictions come from? Not from the past itself so much as how we engage with it, how we construct our collective historical memory. There are a few things going on here. First of all, a pessimistic conviction that things were better in the past. Nostalgia's all around us, even now. Imagine how much more pronounced it would have been in the largely oral cultures of the distant past, where deeds could quickly grow in the telling and ancestors became heroes, history folded into myth in the songs of the bards and rhapsodes. But in transforming our ancestors into heroes and gods, we also sell them short. When we look at their great achievements and imagine that they couldn't possibly be the work of ordinary men, we're patronising their builders as much as we're complimenting them. This is one of the reasons archaeologists get so annoyed by the 'ancient aliens' stories of Von Däniken and his ilk.

Next, the fact that civilisations really do rise and fall; there really are ruptures and discontinuities. History has often been lived among the ruins of those who came before; ruins whose construction people weren't always able to explain. Assassin's Creed's Ezio era show this rather nicely for Renaissance Italy, where the shadow of Rome looms large. But Rome was perhaps too well known, too tangible, to be a real precursor civilisation in the mould of modern sci-fi. The end of the Mediterranean Bronze Age makes a better example. About 1200 BC, from Greece to Mesopotamia, regimes fell and technologies slipped from knowledge. The Greeks, for example, lost writing for around 500 years. What followed has often been known as a dark age, but it's never so simple. Talking about cultures as 'more' or 'less' advanced is a bit of a red herring: where technologies were lost, others - like iron-working - were invented; freed from the old straitjacket of imperial control, Phoenician merchants spread across the Mediterranean. As ever, one man's catastrophe is another's opportunity. We know that some memory of the Bronze Age was preserved in the centuries that followed. There are kernels of authentic period detail among the hotch-potch legends of Homer; in Mesopotamia, texts record the delight and fascination when ancient tablets were unearthed in building works. When the past is glimpsed through song and shadow, no surprise that it grows in the imagination.

The Fall of Babylon, by John Martin. 1835.

Finally, there's our attempt to grapple with a past that dwarfs our ability to map and remember it. Of course, the time covered by reliable records varies from place to place and time to time, but history's only ever a weak torch in a very big, very dark forest. Modern humans evolved around 100,000 years ago. The first urban civilisations and written history date back only around 5-6000 years. Even with all the wonderful achievements of palaeolithic archaeology, that's still a vast expanse of the past that we can glimpse only darkly. Can anyone blame us if, even if just for a moment, some instinctive reflex recoils from it, thinking: 'There must have been something more for all that time than just hunter-gatherers! What were we doing for the previous 95,000 years?'

Precursor civilisations are what happens when our historical memory fails us, when the feeble light of real knowledge gutters out and we just stare into the darkness and our imaginations take over. Assassin's Creed understands this, I think, and is fascinated by it; Origins perhaps most of all.

When we slip from the present day to Ptolemaic Egypt, through the real ruins of the New Kingdom and the Old, through into the fantasy-spaces of those who came before, it's making tangible - in virtual space at least - something of how humans have always lived among the ruins and tried to remember those who came before.