"Madagascar" was inspired by the 1984 Mirta Yáñez short story "Beatles contra Duran Duran" ("Beatles Against Duran Duran"). The story chronicles the relationship between the narrator, who is a single mother and pragmatic middle-aged professor of physics, and her moody adolescent daughter. The plot of the film draws loosely from the original text, which Pérez appears to have used as a point of departure and a rough character sketch as he worked closely with cinematographer Raúl Pérez Ureta and screenwriter Manuel Antonio Rodríguez during the developmental stages of the project. Laura (played by Zaida Castellanos) and Laurita (played by Laura de la Uz) are the central characters of the film and bear an obvious resemblance to the unnamed narrator of the short story and her daughter, Pilar. However, the film's mode of expression as well as its plot both diverge greatly from that of the story.