Hamlet’s character is complex because he hides his real motivation.
Hamlet made the play to reveal the truth and remind Claudius of the murder that he committed. Hamlet wanted to watch Claudius’ face be filled with emotions and have a proof that he was the one who murdered his father. Thus, the real motive of Hamlet for making the play was to look for evidence of the king’s murder.