W.B. Yeats’ contention that “in dreams begins responsibility” haunts the eponymous hero of Dylan Horrocks’s exuberant Sam Zabel and the Magic Pen. On the opening page, Yeats’ assertion is placed in clear opposition to feminist educator/porn director Nina Hartley’s insistence that “desire has no morality”. Throughout the book, Horrocks navigates uneasily between these contradictory positions, seeking some resolution or, at least, peace of mind.

Sam Zabel and the Magic Pen is a meta-fictional jeu d’espirit, a buoyant, erotic meditation on the magic of comics, the dangerously liberating power of fantasy and a journey through the conflicted psyche of its author. In many ways it’s a spiritual sequel to Horrocks’s celebrated Hicksville, itself a dazzling ode to the medium’s past and potential, which constructs an imaginary and utopian safe harbour for the world’s comics in New Zealand. Here Horrocks dives into altogether more troubled waters.

The story opens with Sam Zabel suffering from serious creative block. Forced to write superhero comics to pay the bills, he hasn’t worked on a personal project for years, and now he can’t even finish his ‘hack’ work. Seeking escape and solace in online Arcadian fantasies, his own creation, Lady Night, invades his reverie to question his talent, self-pity and repressed anxieties.

At his lowest ebb Sam bumps into Alice, a geeky, feminist web-cartoonist who mentions a mysterious old New Zealand comic, The King of Mars, which piques his curiosity. Locating a copy, Sam accidentally sneezes on a page and – in a neat homage to Winsor McCay’s classic 1900s newspaper strip “Little Sammy Sneeze” – disrupts reality. Transported into the comic, he’s stranded on Mars and mistaken by the locals as their prodigal cartoonist ‘god king’ and must face hazards and temptations, from rampaging monsters to the voracious carnal needs of his long neglected Venusian wives.

Coming to his rescue and guiding him through this comic kingdom, and worlds beyond, is the plucky, jet-booted manga schoolgirl, Miki, who tells of a fabled magic pen “that grants its users their heart’s desire”. The pen created The King of Mars and other ‘sacred’ comics tucked away in Miki’s satchel, and Sam learns how to traverse these stories within stories by giving them the breath of life.

Hoping the pen may restore his creative mojo, Sam, alongside fellow travellers Alice and Miki, plunge headlong through a multiverse of comic genres, tropes and intersecting realities, to track it down. During their Möbius strip-like quest, which whisks them back to the unsullied dawn of graphic story making and deep into the toxic recesses of violent male delusions, our adventurers have to confront their own shifting attitudes to fantasy, representation and self-censorship. And, like the best stage enchantment, the inky talisman turns out to be artful misdirection, behind which Sam’s creative coming of (middle) age plays out.

At times Sam, an obvious avatar for Horrocks, is frustratingly passive in his own story and the characters clumsily voice their creator’s ruminations on the pleasures, perils and social consequences of unfettered fantasies. Yet, there’s no denying Horrocks’ sincerity in placing himself at the centre of this tricky, irresolvable dilemma. He does so with playful good humour, ingenuity and an infectious sense of wonder, ably served by a lean, loose Tintin-esque line and sparkling, resonant storytelling.

For all its angst over the nature and responsibility of art, Sam Zabel and the Magic Pen reveals Dylan Horrocks at the top of his game, taking on contentious subjects with great gusto and flair.