NEW YORK - In the upcoming video game "Star Wars: The Force Unleashed," the evil Stormtroopers are smart enough to keep players guessing.

Throw something at the white-armored troopers, and they may toss a grenade back. Or they might just put their hands up. Or they could do something completely new each time the game gets played.

Video games used to come preprogrammed with canned movements that expert players eventually could anticipate and figure out. But recent advancements in video game design - and new game consoles with dazzling computing power - have endowed computer-controlled characters with a sense of self-preservation and unpredictability not seen even a year ago.

The "Star Wars" game, which publisher LucasArts will show off at this week's E3 Media and Business Summit in Los Angeles, is just one of the games offering this advanced degree of realism. Game designers say this increasing sophistication is helping to put their medium on par with movies as a form of mainstream entertainment.

"I think you connect to these characters much more," said Torsten Reil, co-founder and chief executive of Britain's NaturalMotion Ltd., the company that developed technology used to breathe life into characters in the "Star Wars" game.

Called "euphoria," the technology generates animation on the fly, so each moment in a game is unique. The first game to feature it was Take-Two Interactive Software Inc.'s "Grand Theft Auto IV," whose April debut rivaled - and in dollar terms bested - blockbuster movie openings.

NaturalMotion grew out of research Reil and colleague Colm Massey did at Oxford University on the way animals and humans move. The resulting technology creates 3-D character animation in real time, simulating the way the body moves so it looks authentic.

Other games deepen their measure of surprise by going in a different direction - abandoning realism.

For example, "Spore," from "Sims" creator Will Wright, immerses players in a world where not only the main character but also the game universe itself is the product of their own imaginations.

Players design a creature that evolves over several levels - which are games unto themselves - into beings capable of intergalactic travel. Because no two characters are the same, each will evolve in a different way.

That's a big contrast to traditional games, in which the main characters, be they James Bond or Lara Croft in "Tomb Raider," are prebuilt by the developers.

"Goldeneye 007," launched in 1997 for the Nintendo 64, was the first in which gamers encountered enemies that could react to what the players were doing, said Libe Goad, the editor-in-chief of AOL's GameDaily.biz site.

"If you shot at them, they got out of the way," she said. "Before, they would just stand there, which made the game easier but it wasn't necessarily a realistic experience."

A few years ago, games began showing off "ragdoll physics," which among other things made computer-controlled enemies look more believable when they died or got shot. But ragdoll technology is for dead bodies. Now Stormtroopers, or the cops in "Grand Theft Auto IV," want to stay alive.

Their microprocessors and graphics chips can serve up vast virtual worlds that always change and get "computer-controlled characters to act as believable as human-controlled characters," said Michel Kripalani, director of business development in Autodesk Inc.'s games technology group. Autodesk's Kynapse software is used by game developers to make nonhuman characters respond to their surroundings.

Reil expects future games to get still more complex and unpredictable. For instance, computer-controlled characters might carry on conversations with their human opponents.

"There are so many other areas we are not really addressing," Reil said.