Lord of the Flies, by William Golding, is a novel which depicts the devolution of civilized boys into savagery on a tropical island. Ralph is one of the oldest boys on the island, almost thirteen, and he has been elected leader of the group. Though he has very few leadership skills, he does know that if they are going to be rescued they must keep a signal fire lit so any passing ships will see them.
For a long time, probably longer than anyone on the island except for Simon, Ralph holds out hope that everything will be fine and they will be rescued. Over time, however, Ralph does begin to despair of that ever happening, especially since no one is interested in keeping the fire going and things are already growing tense between Jack's group and Ralph's group of boys.
In chapter seven, Ralph is on the other side of the island, looking down at the rocks below and then out to the vastness of the ocean, and he is overwhelmed with despair.
Wave after wave, Ralph followed the rise and fall until something of the remoteness of the sea numbed his brain. Then gradually the almost inﬁnite size of this water forced itself on his attention. This was the divider, the barrier. On the other side of the island, swathed at midday with mirage, defended by the shield of the quiet lagoon, one might dream of rescue; but here, faced by the brute obtuseness of the ocean, the miles of division, one was clamped down, one was helpless, one was condemned, one was—
Just as Ralph is about to lapse into total despair about everything, Simon quietly speaks words of encouragement to him, saying he is sure Ralph will "get back all right." This is a comforting thought to Ralph, though he has no way of knowing if Simon is correct.
Later in the chapter, however, Ralph is again confronted with the realization that things on the island are not improving and in fact are getting worse. He has a confrontation with Jack in which he realizes that Jack hates him just as he has always hated Piggy, and this adds to Ralph's despair.