One reason that William Golding wrote Lord of the Flies was as an answer to the sugar-coated optimistic Coral Island written by Ballantyne. Golding's allegory is very dark: the Christ-like figure of charity and spirituality, Simon, is beaten to death by boys in an orgiastic frenzy. At the narrative's end, the island is destroyed, Ralph is running for his life and is only saved by the deus ex machina of the warship and Naval officer that appear "just in the nick of time." A painted savage appears out of the carnage, starts to come forward, "then changed his mind and stood still."
When the officer speaks to him, Ralph sobs uncontrollably as he thinks of the former glamour of the beaches, but "the island was scorced up like dead wood."
He wept for the end of innocence, the darkness of man's heart, and the fall through the air of the true, wise friend called Piggy.
Uncomfortable with Ralph's display of emotion, the officer turns away. The last line of the novel reads,
He turned away to give them time to pull themselves together; and waited, allowing his eyes to rest on the trim cruiser [warship] in the distance.
These are the final images of the novel: a filthy blond-headed boy running in terror, a red-haired boy with paint on his face, holding the remnants of a pair of glasses, a scorched island billowing black smoke, and a warship. There is no optimism.