American Pie could never be made today.

Just the premise of high school boys vowing, by hook or by crook, to lose their virginity before prom feels like a game of Russian roulette with four bullets in the chamber. Per their own guidelines, it has to be “valid, consensual sex”, nothing with prostitutes, but the timeline doesn’t exactly incentivize good behavior, especially when they decide that working together is the best way to make it happen. And that’s before you get to some of the film’s more dubious particulars, like filming a foreign exchange student naked without her knowledge and broadcasting it via webcam to the entire class. (The resolution is quite poor, for what it’s worth. There’s only so much smut that can survive a dial-up modem.)

Yet 20 years later, American Pie is being made all the time. It’s being made in The 40-Year-Old Virgin, in Superbad, in Neighbors, in Booksmart, in the constant flow of cringe-inducing comedies about love and friendship among the sexually inexperienced. The films have evolved with the culture – and frankly, a healthy shift in the rules of engagement – but they’re part of a long continuum of teen (or man-child) sex romps that deal in humiliating rites of passage. For male viewers especially, it’s a perverse form of escapism: they can recognize how awkward and embarrassing those first sexual encounters tend to be, but hey, at least they didn’t liken a woman’s breasts to “bags of sand” or get caught dipping their wick into a warm apple pie.

In 1999, American Pie was at the end of one phase and the beginning of another, which is why it seems both dated and prescient – a relic from a randier era of cable-ready frathouse and gross-out comedies, and a look ahead to a sweeter brand of raunch, rooted in deep friendships and the possibility of a more mature, longer-lasting romance. At the time, the Farrelly brothers hits Kingpin and There’s Something About Mary were sparking a can-you-top-this cycle of R-rated comedies that carried into the early 2000s, with titles now either forgotten (Say It Ain’t So, Slackers, Waiting …) or not worth remembering (Scary Movie, National Lampoon’s Van Wilder).

Jason Biggs, Eddie Kaye Thomas and Thomas Ian Nicholas in American Pie. Photograph: Moviestore/REX/Shutterstock

Critics were divided on American Pie’s contributions to the trend – the infamous pie, the semen in a beer cup, the mochaccino spiked with laxatives – but they were by no means the lowest of the low. And these set pieces were the big draw, just as they were a year earlier with There’s Something About Mary, when the “hair gel” scene and the “zipper” scene were shorthand hooks that brought people to theaters, regardless of the actual premise. The film also worked in the post-Animal House tradition of boys behaving badly, specifically Porky’s, which was also about nerdy high school students who make a pact to lose their virginity. The webcam in American Pie was merely a tech update on the locker-room peephole that Porky’s plastered on its poster, and both films were fully prepared to deliver the voyeuristic kick they promised. There would be nudity – and, with American Pie, an “unrated” home video version that suggested (but didn’t deliver) material that was too hot for MPAA.

Three sequels and a direct-to-video spinoff series down the line, however, it’s worth reflecting on the specific magic that made American Pie the sensation its predecessors and imitators were not. Much of it has to do with the casting, which brought together several stars (or near stars) of tomorrow before they were recognizable faces. Eugene Levy and Jennifer Coolidge were the only established comic talents – Levy, out of some mercenary sense of obligation, would be the only star to appear in all eight American Pie movies – and Alyson Hannigan had completed a couple seasons of Buffy the Vampire Slayer, but Jason Biggs, Chris Klein, Tara Reid, Mena Suvari, Natasha Lyonne, Seann William Scott and Shannon Elizabeth were mostly unknown, and John Cho, who comments briefly on Coolidge’s Milf-y appeals, was still five years away from the first Harold & Kumar film.

Directors Paul and Chris Weitz, working from a script by Adam Herz, give American Pie a democratic quality that allows all these young actors a chance to set themselves apart, though the boys naturally get more opportunities than the girls. Biggs, Klein, Thomas Ian Nicholas and Eddie Kaye Thomas play the four virgins on the prowl, and they all eventually get what they want, but not before the universe punishes them for their efforts. Hannigan, Suvari, Reid and Coolidge are, respectively, the partners who generously escort them into manhood, half by their own sexual aggression (Coolidge as a Mrs Robinson type, Hannigan as a dorky flutist who had an awakening “this one time, at band camp”) and the other half by romantic coercion.

Natasha Lyonne and Tara Reid in American Pie. Photograph: Zink/Universal/REX/Shutterstock

As Jim Levenstein, Biggs constantly hurls himself into a buzzsaw of sexual mortification, which the film shrewdly casts as at once identifiable and wildly over-the-top. It’s common for teenage boys to squint at softcore porn through the bars on premium cable channels or to get caught masturbating by a parent or to fumble out of inexperience or overexcitement. But it’s uncommon to have Mom squeal at a boner in a sweatsock or Dad come home to the pie wreckage or the entire school witness a striptease act, followed by two straight instances of premature ejaculation. Through all the cringing, there’s the comfort that many have had experiences like Jim’s, but nothing so epically hapless and clumsy, and no heart-to-hearts with Dad afterwards to heighten the agony.

American Pie emphasizes the camaraderie of the group and the harmless good nature of its members, who maybe aren’t in the category of regrettable lovers, after all. But it gives so little thought to the opposite sex, who are either brazenly lusty or careful gatekeepers of their own chastity, waiting for an “I love you” or some other show of sensitivity, like a password at a speakeasy. Women seem as inexplicable to the film-makers themselves as they are to the characters. That’s been an unfortunate part of the continuum of teen sex comedies, too, long before American Pie and well past it.

There’s a moment in the film that deals with the fallout from Jim’s webcam encounter with Nadia (Elizabeth), the foreign exchange student. Jim’s classmates are all pointing and laughing, of course, at his goofy striptease and sexual ineptitude, but Nadia has been disappeared from the scene, hastily booted back to Slovakia. She’ll appear again at the end, happily taking in more dancing via webcam, but the film is never conscious of how she might actually feel. For Jim, their bedroom rendezvous was another in a series of screw-ups to get over; for Nadia, it meant immediate exile to the hinterlands of eastern Europe. American Pie may not be about her, but in a film about young men going through emotional and sexual rites of passage, she’s just another bump in the road.