When a movie becomes a video game, players expect consistency. A game that doesn't accurately depict the trench run from "Star Wars," the gadgets from "James Bond" or Jessica Alba from "Fantastic Four" will lose its luster among fans of the game's movie.

But what if the filmmakers behind "The Matrix" decide to change their saga's ending for the video game?

That's just what happened during the development of "The Matrix: Path of Neo," the next gaming installment of the body-and-mind-bending franchise, coming out this week for PlayStation 2, Xbox and PC.

(Note: This story discusses some — but not all — of the surprises that conclude "The Matrix" movie, the latest "Matrix" game and the end of a recent PS2 game.)

"The ending for a gamer was problematic," said Dave Perry, the game's lead designer and president of the development company Shiny Entertainment. "For a gamer, it's just not acceptable to stand there and just get shot full of bullets and say, 'Congratulations, you just won the game.' "

Those who have seen 2003's "Matrix Revolutions" will realize that Perry isn't exactly spoiling the ending. In the movie it's not bullets that take Neo down. It's Agent Smith. And in the spirit of an elderly Obi-Wan Kenobi, Neo throws the movie's climactic fight.

Perry didn't think gamers would be satisfied playing an ending like that. And neither did the filmmakers responsible for the movies, Larry and Andy Wachowski. The brothers actually make a cameo appearance late in "The Path of Neo" to explain why they made a change.

As gamers reach what they might expect to be the final stage of the game, they are instead greeted by the Wachowskis. The brothers don't exactly appear as themselves, though revealing what form they actually take would spoil one of the game's most charming surprises. Minding their manners, they begin by hailing gamers for their efforts:

Larry: "First of all, congrats on reaching the final stage of this game. You kick ass."

Andy: "Yes, we salute your excellence on the gaming field."

Larry: "Now the real reason we're here is to discuss the big problem we faced in turning these three movies into a video game."

The Wachowskis play off their conundrum as comedy, but eventually come to the same view expressed by Perry: Self-sacrifice is good for a movie, but no fun for a PlayStation.

Larry: "If you're like us, you're ready for 15 minutes of sweaty-palmed button-pushing action to kick the crap out of some big badass boss."

Andy: "So we suggested to Shiny that we change the ending."

So instead of Neo meeting an end of sorts in the crater, he climbs out and finds himself — and the gamer controlling him — confronting a much more epic final battle.

Whether gamers truly demand a higher octane in their game endings than moviegoers do, the fact is that endings don't always get this much attention from the people making games.

Publishers and developers have long acknowledged that many gamers never even get to their endings. That, combined with the fact that parts of a game are often developed in the same order in which they are played, often leaves endings as afterthoughts.

"I think there's an overabundance of crappy endings," "God of War" designer David Jaffe said. "I think the developer and publisher run out of time, and because of that, it tends to be unsatisfying."

Jaffe hadn't played "Path of Neo" and couldn't comment on that game's ending, but he dismissed the idea that games don't do downer endings — no matter how uncommon they may be. He said games such as "Metal Gear Solid" and "Silent Hill" had effective if not completely triumphant endings.

That said, he kept a downer ending out of his own "God of War," which begins with the lead character seemingly plunging from a cliff to his death and then presents the entire game as flashback leading to that event. "The original ending was that he hits the water and that's it: he's dead," Jaffe said. "We changed that, not because we worried about a sad ending. We thought it would be more satisfying that the gods realized he should be a new god of war."

For the developers of "Path of Neo," tweaking the series' ending was consistent with their overall effort to let gamers explore other alternate "Matrix" histories. While Keanu Reeves' Neo thinks better of scaling the face of a building during the early moments of the first "Matrix" movie, the new game lets players see what had happened if Neo had not backed off the ledge. If gamers pursue that path, they'll eventually find that the plot converges with that of the movies.

"Path of Neo" has been touted by Perry as the belated fulfillment of the potential that the "Matrix" series seemed to have for games from the moment moviegoers saw the first slow-motion bullet-time wall jump. The first console "Matrix" video game, 2003's "Enter the Matrix," sold more than 2 million copies, cost $30 million to make (a record, according to Guinness) and had so much Wachowski involvement that it included two hours of footage shot exclusively for the game. But critics hated it, and Perry has since apologized for a rushed project.

"The Matrix" has also struggled as a massively multi-player online role-playing game. This spring's "Matrix Online" was downsized this summer from nine shared worlds to three because not enough gamers populated those nine initial worlds.

Perry has pulled out the stops for this new effort. In one of the showpieces he is proudest of, 350 Agent Smiths crowd the screen during the game's re-creation of "Matrix Reloaded" "burly-brawl" fight. That's more than double the Smiths who appeared in that scene in the movie.

Is a changed "Matrix" ending also what gamers are looking for? And is it the only kind of ending they'll stand for? Perry, the Wachowskis and the rest of the team behind the game will find out soon enough.