Like Nick Fury (Agent of SHIELD), with whom he shared a comic (Strange Tales) in the 1960s, Dr Strange – originally ‘Master of Black Magic’ but eventually ‘Sorcerer Supreme’ – has proved more useful as a way of binding Marvel Comics’ universe by appearing in cameos across many titles than as a headliner in his own several-times-cancelled book. Whenever Spider-Man, the Hulk or the Fantastic Four have problems with the supernatural rather than aliens or bank robbers, they visit Dr Strange’s Greenwich Village Sanctum Sanctorum for a consultation – as alluded to here in a neat mid-credits sting featuring one of Marvel’s star movie characters.

Created in 1963 by artist Steve Ditko and Stan Lee (perhaps patterned on an earlier Lee-Jack Kirby character, the short-lived Dr Droom), Stephen Strange has had several longish runs in his own comic but also several lengthy hiatuses in the limbo inhabited by heroes without their own title; there is currently an ongoing Dr Strange book almost solely because Marvel’s movies division has chosen to give him a film push, and it remains to be seen whether it will last any longer than his previous incarnations. Strange’s surreal world, with trips to other realms given a unique look by Ditko, has proved attractive to many comics artists and writers, even if it has seldom been quite as appealing to fans, who’ve admired the work but have been much more passionate about characters like Ghost Rider or Wolverine, whose bursts of superstar popularity have eclipsed the Earth’s Sorcerer Supreme.

The appeal extends to filmmakers, who have also been drawn to the character: there was a silly Dr. Strange TV movie in 1978 and a relatively impressive animated feature in 2007, and Strange has often been closely approximated at budget levels from minimal (Jeffrey Combs in Doctor Mordrid, 1992) to healthy (Nicolas Cage in The Sorcerer’s Apprentice, 2010). Scott Derrickson, who climbed back to modest respectability with Sinister (2012) as a way of atoning for the 2008 remake of The Day the Earth Stood Still, joins the list of lucky-to-get-the-gig and professional-enough-not-to-mess-it-up Marvel directors – essentially a safe pair of hands with enough creativity to deliver a solid entertainment but not so much that he’ll break the mould (the negative example of Ang Lee’s 2003 Hulk is often cited).

Doctor Strange is stuck with a need to go over the origin story. Like other Marvel characters of the same vintage (notably Spider-Man, Iron Man and Daredevil), the doctor has to suffer great loss, physical injury/transformation and attain superpowers while learning harsh life lessons that set him on a course to becoming a better person. In an accelerated arc, the arrogant, materialist surgeon loses his career and pride, has a spell as a stubble-bearded derelict (the film omits alcoholism from his résumé), is confronted with the revelation that a world of magic exists, and then speed-reads his way to sorcerous supremacy (he has a photographic memory) to the point where he is able to face formidable enemies who have been studying magic their whole lives. The script – by Jon Spaihts (Prometheus), with drafts by Derrickson and his Sinister co-writer C. Robert Cargill – sells this by suggesting that Strange is fit to replace the Ancient One as Sorcerer Supreme because, like her, he’s willing to break rules, even to the extent of using forbidden time-tampering in a confrontation with extra-dimensional tyrant Dormammu (here represented as a big corrugated face in the sky) to come up with a messy but workable way to save the Earth.

It’s possible that Dr Strange has survived as a character for so long because writers and artists want to write about him and draw him. When Marvel attained a counterculture hipness in the late 1960s, artist Gene Colan and writer Roy Thomas gave Strange an acid-hued credibility (including a Tom Wolfe cameo), which explains why Stan Lee is reading Aldous Huxley’s The Doors of Perception in his cameo here. Though Doctor Strange has several of the recurring weak spots of Marvel’s movies – an underwhelming lead baddie (Mads Mikkelsen’s Kaecilius) who turns out to be the stooge of a real Big Bad, an overqualified female lead (Rachel McAdams) who has to be shoehorned into the story and then stands on the sidelines; an overreliance on thumping as a superpower, which is especially galling with characters who are supposed to be magicians – the same potential for eyekicking appeal leads to a great many pleasing, disorienting sequences.

The film’s Dark Dimension is, well, darker than Ditko’s Dalí-cum-Escher locale, but is refreshingly unusual for a comic-book movie, building on the trip to infinite smallness in Ant-Man (2015) with touches of the last act (‘Beyond the Infinite’) of 2001: A Space Odyssey (1968). Newly made for the movie is the Mirror Dimension, which riffs on the folding-up-cities gambit of Christopher Nolan’s Inception (2010) to allow shifts of gravity, buildings morphing and multidimensional martial arts; for once this makes fully justified use of the 3D format that is now mandatory for superhero movies but tends to become a distraction rather than an added feature. There’s a genuinely inspired magic fight scene that takes place while time runs backwards for everyone but the combatants, so that Strange and his allies battle Kaecilius and his zealots while Hong Kong spectacularly and pleasingly undestroys itself all around. After that, there’s a nice touch as the arrogance of the original Dr Strange, who plays disco trivia games while performing a brain operation, reasserts itself when he puffs himself up to trap a vastly powerful cosmic entity in a Groundhog Day time loop (“Dormammu, I’ve come to bargain”) on the principle that if he can’t win a fight, he can at least lose it endlessly and monopolise the extradimensional tyrant’s attention for eternity if he doesn’t back off our plane of existence.

As with all Marvel films, casting is key. There’s a potential overlap between Stephen Strange and Iron Man’s alter ego Tony Stark (who were drawn a lot alike in the 1960s and are again now) in the combination of snarky put-downs, reformed high-living with occasional relapses, and self-propelled rise to supremacy in their fields. Benedict Cumberbatch manages not to seem like a warmed-over Robert Downey Jr (though, of course, they both have a Sherlock on their CV – and Cumberbatch even inherits Downey’s Irene Adler, Rachel McAdams). Not only does he convey growing spirituality and sorcerous power but also a confidence and even a relish in irresistible accessories such as the Cloak of Levitation (here, for the first time, a character in its own right) and the all-seeing Eye of Agamotto (an infinity stone, one of the plot-pegs Marvel uses to wire together its film franchise). Whenever the action threatens to get samey or the spectacle verges on the monotonous, the film can rely on Cumberbatch’s sense of fun to tide it over. This isn’t so much the story of a man shouldering responsibility as of a pompous ass who unbends enough to share his enjoyment of his achievements with lesser mortals.

One reason Mikkelsen’s Kaecilius and McAdams’s Christine Palmer make so little impression is that the film sets up Strange’s eventual struggle with Chiwetel Ejiofor’s Mordo by giving the number-two disciple more interesting things to do than the ostensible villain. (As with Mark Strong’s Sinestro in 2011’s Green Lantern, a hero’s comics nemesis is introduced as a mentor/ally but ‘goes dark’ unnoticed in the finale.) Meanwhile shaven-headed Tilda Swinton turns out to be inspired casting for Strange’s guru and predecessor the Ancient One (a man in the comics) and brings ineffable cool (plus an impressive bald pate) to a part that could easily have been a simple dispenser of arcane exposition.