Although Ralph tries to evade Jack's tribe in Chapter Twelve, he is eventually forced to flee his hiding place once he realizes that Jack has set the jungle on fire to smoke him out. He is chased by the crazed hunters down to the beach, where he collapses, only to see a naval officer standing in front of him. The officer's ship had come to the island after spotting the fire, and he wonders whether the boys are "having a war or something" or up to "fun and games."
This is ironic in multiple ways. First, although the officer does not mean the term literally, what is occurring on the island is indeed very much a war with real lives at stake. There is something sinister in how easy it is to dismiss the will of children, who in this case were very much capable of falling prey to the worst tendencies of the human mind. Second, the question is ironic on a larger scale in that the boys' war is surrounded by an even larger and far more destructive one--World War II. In the eyes of the officer, the boys' behavior is certainly diminished in comparison to the mass casualty of the war around them. Despite the differences in consequences, however, his condescending tone is ironic, for violence--no matter how small or big--is equally senseless. One could have posed that exact question--"Having a war or something?--to the officer and all the other men engaging in battle.
A possible irony exists in that the officer is himself in a war, a World War, something created and fought by adults, so he finds it a bit humorous that children, who adults believe are innocent and naive, would be "having a war or something." Since adults generally believe that children are innocent, that they have not had enough exposure to the harsh realities of the world and of life, they would not be capable of war. Perhaps Wiliam Golding, the author, wants his readers to think about whether or not all humans, regardless of age, are capable of meanness, physical violence, even war. After all, these seemingly innocent boys, after only a couple of days of isolation from civilization, quickly devolve into savage behavior.