Sonic’s teeth were creepy. The hedgehog’s fur needed smoothing. His eyes were too small. And where were his signature white gloves?

The scathing social-media reaction to the first Sonic movie trailer in 2019 kicked off a several-million-dollar, weekslong scramble at Paramount, the studio that made the movie, to make over the beloved blue hedgehog, star of a successful videogame series.

Fast forward five years. A spinoff series, “Knuckles,” starring a red anthropomorphic echidna-companion of Sonic, is scheduled for streaming release next month, while the third Sonic film coming in December is expected to gross more than the second, pushing the global gross for all three past $1 billion.

Studios are increasingly mining videogames for characters and stories to bring to life in TV shows and films, particularly as audiences grow tired of story lines based on comic books. As Sonic’s creators learned, a key part of success is appealing to die-hard fans and new audiences without betraying the original game.

Gamers are a highly engaged bunch, said Helene Juguet, managing director of Ubisoft Film & Television, the production branch of Paris-based videogame maker Ubisoft Entertainment , known for its Assassin’s Creed, Just Dance and Tom Clancy games. “If they don’t like something, they will tell you.”

Seven movie adaptations of videogames were released broadly in 2023, including “Five Nights at Freddy’s” and “Gran Turismo , ” up from two the prior year, according to Ampere Analysis. Some 19 TV shows based on videogames made their debut last year . More videogame-inspired projects are in the works: Nintendo and Illumination earlier this month announced plans for a new film based on the Super Mario Bros. world slated for release in 2026.

A pandemic spike in gaming during lockdowns further fueled videogame fandom , and studios went hunting for new ideas.

“The Super Mario Bros. Movie” was the second-highest grossing film of 2023 after “Barbie,” pulling in $1.36 billion at the box office, more than two comic-book adaptations, “Guardians of the Galaxy Vol. 3” and “Spider-Man: Across the Spider-Verse.”

Some fans of comic-book movies have complained that the quality of new projects has begun to slip, while for others, the sheer number of movies and TV shows became overwhelming, or seemed to require homework. In “The Marvels,” a box-office underperformer last year, audiences were more likely to understand the plot if they’d seen the Disney + series “Ms. Marvel,” “WandaVision” and “Secret Invasion” in addition to the prequel movie “Captain Marvel.”

Videogames offer fresh characters and new worlds that can appeal to young children and their parents—like Sonic and Mario’s adventures—and to adults seeking mature story lines, such as those in the TV show  The Last of Us.” Game developers and fans are often deeply involved in adaptations, ensuring that the end product honors the source material. A generation of gamers are now in creative positions across Hollywood.

Michael Jonathan Smith, showrunner for “Twisted Metal,” a Sony Pictures Television action-comedy series on Peacock, grew up playing the videogame of the same name and wanted to make sure the show retained its nostalgia factor and vehicular-combat thrills. Set in a post-apocalyptic world, the main character shuttles resources between fortified municipalities, engaging in machine-gun, ballistic-missile and other explosion-filled conflicts along the way.

“The unbridled joy of playing is something I wanted to bring into watching it,” Smith said. The show’s creators infused it with music, such as Ol’ Dirty Bastard’s 1995 hit “Shimmy Shimmy Ya” and Oasis’s “Champagne Supernova.”

Movies based on videogame adaptations and released broadly in theaters grossed $712.2 million at the domestic box office last year, more than double what they brought in the prior year, according to Comscore. Superhero film adaptations, meanwhile, brought in about $1 billion domestically, down 42% from the prior year.

“Studios are realizing that the bloom may be off the rose for some of the superhero movies,” said Paul Dergarabedian , senior media analyst at Comscore.

Risk of failure

Some adaptations have drawn fan ire, prompting studios to make artistic changes.

“Every design now is vetted within an inch of its life,” said Marc Weinstock, president, worldwide marketing and distribution at Paramount. After the backlash over the trailer, Paramount conducted focus groups and hired a new animator to alter the lightning-fast critter’s appearance so that it appealed to die-hard fans.

Longtime gamer Jake Morrissey of Calgary, Canada, said he was disappointed by the 2022 TV show “Halo,” which is based on the Microsoft -owned videogame series of the same name, because early on it revealed the face of the main character, a super soldier known as Master Chief. In the games, Master Chief’s face is hidden behind a helmet.

“It definitely disillusioned fans,” said Morrissey, who is 26 years old.

Kiki Wolfkill, head of Xbox intellectual-property expansion and entertainment at Microsoft, said the company knew the decision would be controversial, but felt it was necessary to tell the character’s story. The team tried to better capture the tone of the game in the second season, putting the camera closer to the characters and making the fights feel more intimate.

“The places where we diverged from canon were harder to swallow for fans if the execution wasn’t there and tone wasn’t there,” she said.

TV shows can draw broad streaming audiences and movies can gross hundreds of millions at the box office, but few films top $1 billion. Hit videogames, however, can generate several billions of dollars in sales over their lifetimes, which means that for some game makers, film and TV adaptations are more trouble than they are worth.

“In failure, we run the risk of compromising the underlying intellectual property. So it’s a high bar,” said Strauss Zelnick , chief of Grand Theft Auto maker Take-Two Interactive Software , on a November earnings call. Take-Two has so far licensed two of its properties for coming film adaptations—its Borderlands and BioShock series—and is cautiously considering others.

Love of the game

To avoid fan disappointment, developers and film studios are visiting game communities on apps like Discord and Reddit to get feedback on ideas, in addition to conducting traditional focus groups.

One finding: Gamers like it when productions bake in cinematic versions of so-called Easter eggs, messages or objects that developers hide in games to make spotting them fun. In a movie or show, they are commonly visual cues, such as a framed photo of a character from the related game that the camera briefly pans to, as a way of showing die-hards that the creators deeply understand the original source material.

“The more subtle, the more fun for people to discover,” said Michal Nowakowski , co-chief executive of Warsaw-based CD Projekt . Its 2022 anime TV show “Cyberpunk: Edgerunners,” made in partnership with Japanese animation company Studio Trigger, replicated the look and layout of streets in the game it’s based on, “Cyberpunk 2077.”

In the game, players navigate a fictional futuristic city as an outlaw seeking a one-of-a-kind implant that is the key to immortality. Players watching “Edgerunners” might recognize from the game a junkyard, a nightclub called Afterlife and the apartment building where the protagonist, David, and his mother live.

Adhan Razzaque, a 22-year-old software engineer in Austin, Texas, noticed: “It makes me feel like I’m being thought of by the production.”

Sony Pictures Television Studios President Katherine Pope said she seeks creators and writers who are fans of the game they are adapting to ensure the final product is authentic. “You have got to love the game,” Pope said, or the storytelling will ring hollow.

Drawing audiences beyond ardent fans is key to adaptations’ success. In 2021, Riot Games released “Arcane,” an animated TV series based on its hit computer game “League of Legends,” in which humanlike or animal fighters called champions battle for control of each other’s territory. The show quickly reached Netflix ’s list of the top 10 most-watched English language TV shows.

“We wanted our players to feel like it was for them, while also being again widely available and accessible,” said Marc Merrill , chief product officer and co-founder of Riot Games, a unit of China’s Tencent Holdings . A second season is scheduled to debut in November.

Write to Sarah Krouse at sarah.krouse@wsj.com and Sarah E. Needleman at Sarah.Needleman@wsj.com