Writer-director Clay Liford offers a bemused yet sympathetic view of a fan-fiction subculture where Dumbledore and Gandalf might strike erotic sparks with some wizard-on-wizard action – and where Capt. Kirk and Mr. Spock can happily-ever-after while sharing a cunning little cottage built for two – in “Slash,” an effortlessly engaging dramedy that somehow manages to sustain an air of buoyant sweetness even while repeatedly referencing erotic fantasies and sexual anxieties. The sporadic flights of taboo fancy are deftly grounded in a coming-of-age story involving adolescent outsiders who write fan fiction during the process of inventing themselves. But this idiosyncratic indie could find a receptive audience spanning several demographic groups — including, to paraphrase Francois Truffaut, grown-ups who have not-entirely-happy memories of their own adolescence — when it takes wing on theatrical and homescreen platforms.

Neil (Michael Johnston), a 15-year-old suburban Texas high schooler, channels his inchoate homoerotic urgings into writing purple-prose “slash fiction” (i.e., fanfic celebrating same-sex close encounters) about the polysexual misadventures of Vanguard, the hunky hero of a mainstream sci-fi franchise. When jeering classmates swipe and share a notebook filled with his scribbled tales, the introverted young writer is mortified. But his public humiliation attracts the attention of a far less inhibited kindred spirit: Julia (Hannah Marks), a slightly older fellow student who also dabbles in erotic fanfic and self-dramatizes to the max. With characteristic brio, she encourages Neil to post his slash fiction on a nominally adults-only website geared toward fans and creators of sexually charged (and highly unauthorized) stories about high-profile fictional characters.

Early on, Liford establishes the complex relationship between Neil and Julia as the heart and soul of “Slash,” charting the evolution of their friendship — and their mixed emotions about inconvenient stirrings of mutual physical attraction — with humor, tact and empathy. For all her impudent bluster, Julia, too, seems more than a tad confused about discovering, or constructing, her sexual identity. (It’s strongly suggested that unhappy experiences with a loutish ex-boyfriend has led her to be, at the very least, bi-curious.) Meanwhile, Neil initially is quite nervous — and then slightly treacherous — as he considers an online come-on from Denis (Michael Ian Black), moderator of the slash-fiction site, who thinks, and hopes, Neil is above the age of consent.

There are about a dozen different points where “Slash” could have devolved into something cringe-inducing – or, as it veers close to an unwitting act of pedophilia, downright creepy. But Liford has too light a touch, and too much compassion for his characters, to stumble across any tripwires. It helps that some of the well-cast supporting players — including Black as Denis and Jessie Ennis as Julia’s very pregnant buddy, Martine — spring pleasant surprises in vividly written roles. But it helps even more that leads Johnston and Marks are so appealing, both individually and as a mismatched couple.

Anyone who saw Liford’s 2011 indie, “Wuss” — a well-received black comedy about a milquetoast high-school teacher who’s mentally and physically tormented by delinquent students — will recognize Julia as a near-identical twin of that earlier film’s Maddie (Alicia Anthony), another spunky young student who provided encouragement to a beleaguered protagonist. But Marks does more than enough to guarantee Julia doesn’t come off as a retread — or, worse, a manic pixie dream girl — by nimbly balancing sarcastic self-assurance and self-doubting vulnerability. That she looks cute in elf ears while cosplaying at the Houston comic con where much of the third act take place is another plus. Better still, Marks brings out the best in Johnston, who makes a winning impression throughout “Slash,“ and is deeply affecting in a key scene with Black — but gets to maneuver through a wider range of emotions whenever Neil is around Julia.

In terms of production values, “Slash” is everything it needs to be, during real-world scenes and witty dramatizations of Neil’s fanfic. It should be noted that in the latter, Tishuan Scott — winner of a SXSW award for his breakthrough performance in “The Retrieval” (2013) — might inspire his own share of fan fiction with his star-powered portrayal of Vanguard as a sexually flexible space stud.

Film Review: ‘Slash’

Reviewed at SXSW Film Festival (Narrative Spotlight), March 13, 2016. Running time:<strong> 100 MIN.</strong>

  • Production: <div>A Well Tailored Films presentation, in association with Boxcar Films, Glass House Prods., Arts+Labor. Produced by Brock Williams, Jason Wehling. Executive producers, Randy Sinquefeld, Jesse Lyda, Louis Black. Co-producers, Traci Carlson, Steven J. Berger.  Co-executive producers, Kevin Green, Morgan Coy, Kristin Johansen-­Berg, Neil Wilson.</div>
  • Crew: Directed, written by Clay Liford. Camera (color), Ellie Ann Fenton; editors, Bryan Poyser, David Fabelo; music, Curtis Heath, Lauren Sanders; production designer, Chelsea Turner; art director, Scott Colquitt;   costume designers, Nichole Hull, Annell Brodeur; sound, Renee Stairs;   assistant director, Andrew Turner; casting, J.C. Cantu.
  • With: Michael Johnston, Hannah Marks, Missi Pyle, Jessie Ennis, Peter Vack, Sarah Ramos, Michael Ian Black, Tishuan Scott.