Bernice S. Summerfield has become a professor of Archaeology at St Oscar's University on the planet Dellah, but ever since her divorce from Jason she has felt old and unloved, and she has begun to seriously consider seducing her student Michael Doran for the thrill. She will soon be leading Doran and the rest of her students on a field trip to the planet Perfecton, which has been under quarantine for centuries ever since it was discovered that the inhabitants had vanished without a trace for no apparent reason. The planet's sun is threatening to go supernova, however, and the quarantine has been lifted to allow the planet to be studied while it still exists. In her rush to prepare, Benny forgets her promise to proofread Professor Archduke's thesis on obscure theatrical forms, and completely ignores two strange men who try to contact her, claiming to be on a mission from God.
After a few days of excavation, Benny and her students return to the ship for the night, while St Oscar's artist-in-residence, Menlove Stokes, remains on the planet, attempting to create a new art form by painting the landscape using pigments derived from his own body fluids. Stokes is thus the first to notice an odd movement on the planet's surface, but by the time he works out what's happening he's too late to do anything about it. Back on the Winton, Benny prepares to meet Doran for what might easily become a tryst in her cabin, and downloads Archduke's thesis to read it while she waits for him to arrive. She is interrupted by the return of the two men on a mission from God, and then the Winton is attacked by the Grel, vicious alien data pirates with a thirst for information. And then the ship is struck by the missile which Stokes saw launching from the planet, and everybody dies.
Benny awakens in an idealised English forest, where her cat, Wolsey, has become a humanoid biped who speaks perfect English and seems to be under the impression that she is a young man named Dick Whittington. Confused, Benny proceeds along the woodland path to a cabin, where cheery little woodland animals suddenly rush in, do all of the washing-up, and scurry out again. Utterly confused and exhausted, Benny staggers to the nearest bed and falls asleep -- but is woken by the arrival of seven dwarves whom she recognizes as her students, although their characters have all become extremely broad and sketch-like. One of her fellow professors, dressed in drag and claiming that his/her name is "Dame Candy", arrives with the Grel in hot pursuit. Like Benny, they remember who they really are but have no idea how they got here. The Grel are driven off by troops from King Rupert's castle, led by Prince Charming, who takes one look at Benny and falls madly in love, much to Wolsey's bemusal. Benny finds that she's been wounded in the fighting, and takes the opportunity to pass out.
Stokes and his fellow academics see a Grel shuttle coming in to land, and flee towards the nearest Perfecton structure. Inside, as the academics try to barricade the door, they stumble across a room filled with vases, guns, and technological playthings. Stokes causes a vase to vanish by shooting it with the gun, but when he twists a control on the gun, the vase reappears in a flat two-dimensional aspect which he can manipulate via the gun's control buttons. One control causes the vase to shrink to a point and vanish, as if he'd sent it somewhere. The Grel then break in, and the fleeing academics are accidentally transported into a vast underground chamber -- potentially large enough to contain the entire population of the planet.
Benny awakens in King Rupert's castle to find Wolsey watching over her; he too is concerned by the existence of a King Rupert in the England of Dick Whittington, and like Benny no longer believes this world to be real. The King, whom Benny recognizes as the captain of the Winton, apparently has three daughters, including Benny; although this seems to mean that Prince Charming is her brother, the King claims that Charming is really a foundling whom he raised as his own. His daughter Aurora is in the upper room of the castle, bound in sleep by a witch's spell, while his daughter Marian is in love with a troublemaker named Robin, whose mere mention makes the King come over all villainous despite himself. All will be settled at tonight's ball, when Benny will choose a husband.
At the ball, Benny finds that all of the principal boys in the world are in fact women, and meets the King's Vizier, who appears more artificial than the other people and is constantly followed around by a vague hissing and booing noise. Sensing inexplicable forces driving her towards closure, she attempts to disrupt the course of the narrative by accepting the proposal of everyone she meets -- Charming, the Vizier, young Jack, the Marquis du Chat, everybody -- but at the stroke of midnight she finds her clothing dissolving into rags about her. She flees into a waiting coach, which takes her to a nearby hovel and then transforms into a pumpkin. An odd-looking horse then walks into the hovel, splits in two and is revealed to be a shell in which the two men from God are sheltering from the narrative forces. They are unable to tell her very much, but do inform her that the situation is deadly serious and that everyone's lives depend upon her.
While exploring the hall, Stokes is attacked by a ravenous alien who turns out to be after the sandwiches in his jacket. The alien uses a translator to speak with the academics, and introduces himself as Thooo, last of the Perfectons. The Grel arrive and capture them all, and Thooo, delighted to see new faces after five centuries alone, explains that the "guns" from the room upstairs transport objects into the Green, a metaphysical force which surrounds everything in the Universe. The vases contain control boxes for manipulating objects in the Green, which means that Stokes sent one of those control boxes into the Green earlier. The population of Perfecton became dependent upon the Green to survive, and thus never developed space travel; but when they learned that their sun was to go supernova, they developed a plan to use the Green to evacuate their entire culture. The Grel, tiring of Thooo's babble, decide to investigate the Green by shooting Stokes with a Green gun, using a control box to manipulate his journey, and dissecting him upon his return.
Benny's Fairy Godfather appears to her in the cellar of the hovel to offer her three wishes, and Benny, realizing that the Godfather is speaking asides to people whom she can't see, wishes to see them. She finds herself onstage in a huge theatre filled with billions of immobile Perfectons, and the Fairy Godfather offers her a bag of sweets and tells her that she must lead the Audience in a song. When she does so, she is permitted to leave the stage, but when she tries to leave the theatre she finds nothing outside. When she steps into the void she arrives in her own childhood bedroom, where she finds a glowing green vase containing an alien control unit. When she takes it back to the auditorium, and ends up back on stage again and thus in the hovel, and the control unit transforms into a magic ring.
Wolsey and the dwarves locate Benny, who decides to hypnotise Wolsey in the hope of tapping his memories of the Winton. He is disturbed to realize that he is not sentient in the real world, and that as an ordinary cat he was unable to read the writing on Benny's computer screen. In this world, however, he can tell that the screen contained the opening of Professor Archduke's thesis on the genre of English pantomime. Somehow Benny and the ship's crew have ended up inside Archduke's thesis. Benny returns to the castle to learn more, and, playing a hunch, takes on the part of Aladdin and agrees to fetch a magic lamp for the Vizier from the desert wastes which lie just beyond the beautiful English countryside. Meanwhile, the Grel trapped in the pantomime try to come to terms with this world by making alliances with the evil characters -- the Ogre, the Rat King, and the Evil Witch.
Benny and her friends enter the caverns beneath the desert in search of the magic lamp, but find that the dangers there are darker in tone and no longer fit into the pantomime genre. They barely escape from the caves with their lives and the lamp, only to find the Grel and their allies waiting for them. The Grel seize the lamp and rub it, releasing a genie which turns on the Grel and their allies. The Vizier transports Benny and her friends back to the castle to safety as the genie wipes out the Grel; this task complete, it rips open the sky, breaking the fourth wall and letting the Audience into the world -- an army of Perfectons who begin to march towards the castle.
Benny realizes that, before the Grel interfered, the pantomime narrative was directing the lamp towards a pedestal in her wedding chambers, and when she touches the pedestal everybody experiences a flash of the real world. Benny then leads the others to the sleeping Aurora's chambers, where she finds an interplanetary missile sticking through the wall -- with its tip piercing a book with the title of Archduke's thesis. Benny awakens Aurora, who slips between dreams and reality as she awakens and manages to warn them that the sun will go supernova within hours. Benny demands more answers from the pantomime horse, but the men within are still unable to answer all of her questions; all they know is that the Winton has been altered on a quantum level by the Perfecton missile. They are, however, able to explain that the God who sent them is the computer built by the People to run their Dyson sphere. God wants Benny to join the Tiny But Interesting Interest Group, beings from her own galaxy who can look into things which might affect the People without violating the People's Treaty with the major powers of this galaxy. Dellah lies in a particularly interesting sector of space as far as God is concerned, and since Benny already knows of the People's existence she would make a perfect agent. Benny agrees to consider the offer after dealing with the pantomime situation.
Benny has the Vizier transport her and Wolsey to the head of the Perfecton army to confronts the Perfectons' leader. The Greater One confirms that her ship was struck by a missile into which the Perfectons had downloaded their entire culture via the Green. The missile was set to lock onto any passing ship and use quantum fluctuations to transform it into a construct bigger on the inside than the outside, in which the Perfectons would make their new home. However, the missile appears to have struck Archduke's data module, causing the quantum fluctuations to create a world of pantomime. The genie embodies the original Perfecton programme, and since the Grel have released it, it is preparing to destroy this entire pantomime world to replace it with the Perfectons' own.
Benny, realizing that the genie has become a part of the pantomime itself, challenges it to prove its power by putting itself back into its lamp, which it promptly does. Unfortunately, she has forgotten the magic words which will transport her and Wolsey back to the castle, and out of desperation, as the Perfectons advance, she rubs the ring she is wearing. The ring, in fact the control unit Stokes shot into the Green earlier, causes Stokes himself to appear before Benny, and his chance remark upon arriving reminds her of the magic words. Unfortunately, the Greater One and a number of his fellow Perfectons are transported back to the castle with them, and they prepare to kill Benny to stop her from placing the lamp on the plinth. Wolsey, though aware that a return to the real Universe will mean he is no longer sentient, holds the Perfectons off just long enough for Benny to put the lamp back in place, restoring the Winton to normal.
The surface layers of Perfecton boil away as the sun begins to go supernova, and Thooo takes advantage of the Perfectons' distraction to shoot them all into the Green. He leads the academics to a viewing pod on the surface, which is no safer but gives a better view; fortunately, at the last moment the Winton arrives and picks them all up. They escape from the system just as the sun finally goes supernova. Once back on Dellah, Benny, who suspects that everything she experienced was planned for, accuses Archduke of planting a homing device in his pantomime data module in order to draw the Perfecton missile to it. Archduke denies the accusation, but that night the data module -- which now contains the entire Perfecton culture -- floats out of the Dean's office under its own power, and transports itself directly into Archduke's waiting hands.
Source: Cameron Dixon