A scene from the film “Unfriended.” (Universal Studios)

This post contains spoilers for “Unfriended: Dark Web,” as well as a host of other, older movies.

Over the decades, the Internet has served as a reliable bogeyman for Hollywood writers in need of a villain. And as the technology that connects us to the World Wide Web has evolved, so have our fears about what we can do with our computers — and what can be done to us. With “Unfriended: Dark Web,” the terror feels more real than ever.

In the 1980s, fear of nuclear catastrophe merged with hype about computer systems for flicks that promised the end of the world was just a mouse click away. In back-to-back years, “WarGames” (1983) and “The Terminator” (1984) posited the dangers of tying our nuclear arsenal to the whims of a computer (WOPR in “WarGames”; Skynet in “The Terminator”) operating outside the controls of its human creators. The Internet was little more than a tool for nerds to share jokes about Star Trek, and we were already contemplating the ways in which it could destroy us.

In the ’90s and early ’00s, that post-history age, when commerce ruled and prosperity reigned, the Internet became a mechanism for shadowy entities to wipe away our identities and steal fortunes. “The Net” and “Hackers,” both out in 1995, suggested that the scariest thing about the Internet was the way computer files could be changed to erase our existence — from the DMV, from the IRS, you name it. The black hat hacker in “Hackers” only used the threat of imprisonment of our protagonists as a means to a more common end, of course: He wanted to make a ton of money. But what had been played for laughs in the previous decade (Matthew Broderick hacks into his high school mainframe in two different films, “WarGames” and “Ferris Bueller’s Day Off”), now felt deadly serious.

In the new millennium, hacking has faded to background noise, and horror pictures have tried to exploit our discomfort with technology. “FearDotCom” (2002) was an early, disastrous effort at making the Internet a terrifying place: Visitors to a website (three guesses at the address) found themselves dead 48 hours later after experiencing creepy hallucinations. Turns out the site was created by a (apparently technologically advanced) ghost that sought revenge on the world for having been murdered years before by a serial killer who allowed people to watch her killing.

Make no mistake: “FearDotCom” is terrible, the 50th-worst movie of all time according to IMDB users. Much better was “Pulse,” the 2001 horror film out of Japan. Nominally focused on spirits trying to invade the physical world by way of our WiFi, “Pulse” was actually about the ways in which the Internet atomizes society and the depression this iteration of isolation engenders.

The two “Unfriended” movies seem to have the best understanding of how the Internet actually works and how people actually use it, and are scarier as a result. Both flicks unfold in real time, with the movie screen portraying the actions on a laptop’s desktop. The characters interact over apps and websites we recognize — Skype, Facebook, that sort of thing — and act as we might expect them to act, typing and deleting and retyping messages in a manner that not only heightens the reality (who hasn’t struggled over the proper wording of an apology?) but also delivers more information to the viewers.

“Unfriended” (2014) focused on cyberbullying and the harm supposed friends can do to each other in the name of racking up likes, shares and clicks. Six friends of Laura Barns (Heather Sossaman), a high schooler who committed suicide after a video uploaded to YouTube turned her into a pariah, start to receive spooky messages from someone with access to Barns’s previously defunct social media accounts. Soon after, they begin committing suicide one by one until Barns’s betrayer reveals herself.

Despite the aesthetic achievement of making us all care about a story unfolding via a laptop screen — I recommend watching it at home on your own for a truly immersive experience — “Unfriended” isn’t as scary as it could be given its reliance on an actual ghost in the machine: It turns out that Barns herself is the one orchestrating the orgy of blood.

Far more terrifying is standalone sequel “Unfriended: Dark Web,” which posits a world where anonymous trolls can get away with literal murder and there’s nothing anyone can do about it. Again told from the POV of a laptop screen, “Unfriended: Dark Web” shows six friends struggling to understand the Internet’s underbelly, where Bitcoin is the preferred method of exchange and snuff films circulate.

“Dark Web” dwells on horrors familiar to those who spend a fair amount of time on social media, such as “swatting” (the practice of calling the cops on someone with the intent of getting the police to injure them) and the casual cruelty that untraceable anonymity inculcates. The evolution of the Internet as a villain — from a place where your identity might be stolen to one in which strangers might murder you for lulz — mirrors the very real way the Internet has evolved for many of us. The nihilistic hate that passes for community in certain corners of the Internet is terrifying, unstoppable and, frankly, incomprehensible.

Maybe Skynet was right all along.