Revenge is a vitally important aspect of the play. Indeed the play belongs to a popular genre of Rennaissance drama known as the revenge tragedy, initiated by Thomas Kyd's The Spanish Tragedy, written around 1590.These plays were melodramatic, indeed sensationalist in nature, and this is also true of Hamlet to some extent, with the murder of a king, the appearance of his ghost and the duty of revenge being placed on his son from almost the very beginning of the play. The entire action of the play is coloured by this theme, as the central character spends nearly the whole time agonising over how best to avenge his father. Shakespeare adds an intense psychological dimension in this way: Hamlet the avenger struggles to carry out his task, it is not entirely a clear-cut situation, and Claudius is not entirely a one-dimensional villain, while Hamlet is also perplexed over what to do about his mother, who has not hesitated to marry Claudius but is innocent of her first husband's murder.
Hamlet does eventually manage to fulfil his role as avenger but is himself spent in doing it; he is killed at the end, but even long before this his nature changes drastically, as he becomes depressed. Claudius too, as we see, feels remorse. The whole business of revenge, of good and evil, is much more complicated in this play than in the usual run of revenge tragedies.