John Blackwelder and Kevin Stiles were flying the Jetstream 31 turboprop airplane into Dulles International Airport last week when they encountered a pilot's nightmare.

An unexpected airplane appeared headed toward them from the right side. A short time later, a door popped open, causing temporary decompression and setting off an alarm buzzer. As they approached Dulles, it became obvious that the airport was shrouded in fog, which did not clear until the plane was 500 feet above the ground. After two near-crashes, the plane came to a hard, bumpy landing.

Blackwelder and Stiles were unharmed, because the "airplane" they were piloting was merely a simulator owned by British Aerospace Inc. at its training facility in Herndon. But as they leaned back, their faces still tense with strain, their hands clammy, the two men -- who are training to be pilots for CC Air, a small commuter airline based in Charlotte, N.C. -- said their "flight" felt frighteningly like the real thing.

Advances in computer hardware, software, computer-generated graphics and motion control bases have enabled simulators to come a long way from the original ones designed by Edwin A. Link. James E. Foster, operations manager of the Training and Simulation Division of AAI Corp. in Hunt Valley, Md., said that as an Air Force pilot during the Korean War, he trained on a Link simulator called the "Blue Box."

"The instruments were not real. There were no visuals," Foster said. "It was very claustrophobic."

On the outside, British Aerospace's $10 million simulator looks like a huge metal box, suspended on tubes and metal legs. But inside, it is the spitting image of the Jetstream 31 turboprop airplane. A lifelike, computer-generated image of Dulles or five other airports can be projected on the window. As the plane "takes off," the simulator slowly rumbles, then tilts, to give those inside the feel of actually taking off.

Joe Mullis, an instructor with CC Air, is enthusiastic about the increasingly high-technology simulators available for pilot training. Mullis said he is able to throw more problems in the path of pilots -- from mechanical problems to icy and foggy weather conditions -- than he would under traditional training. In addition, Mullis said CC Air estimated that it costs $400 an hour to train on simulators compared with $1,000 an hour to train on airplanes.

These days most airlines are opting to do much or all of their pilot training on flight simulators, just as the government is turning toward simulation for training everyone from pilots and soldiers to air traffic controllers.

Many of the simulators look like sophisticated, lifelike video games.

Take, for instance, the 20-foot-radius dome built by AAI, which is used to teach Marines how to fire Stinger missiles. A computer-generated image of an enemy airplane is "flown" across the sky of the dome, while the sound of the aircraft grows louder. The Marines use equipment designed to operate exactly like a Stinger weapon system. If a hit occurs, the plane will "explode."

The ultimate video game of the simulation world, the Nintendo of the military set, is probably the National Test Bed, an elaborate simulator located near Colorado Springs and the most complicated simulator ever attempted.

Martin Marietta Corp., the prime contractor on the project, is trying to do what many scientists feel is simply not possible -- write software that simulates the physics of thousands of objects moving through space, so that it can test whether the Strategic Defense Initiative will really work.

"The idea is, you might have ballistic missiles coming toward the U.S., and there could be hundreds of warheads mixed in with thousands of decoys," said J. Patrick McGinn, a spokesman for Martin Marietta.

The simulator has to test whether the sensors can distinguish between sensors and warheads and hit the warheads. To do that, it has to take into account numerous factors about the Earth's environment, physics and the random movement of thousands of objects.

It takes an enormous amount of computing power -- two Cray supercomputers, two IBM 3090 mainframes and four DEC VAX mainframes, the equivalent computing power of more than 600,000 personal computers -- to run the National Test Bed. The project could not even have been undertaken a decade ago.

If it is a success, it will be the most elaborate, sophisticated, computer-simulated war game ever created. But critics are skeptical, calling the effort science fiction.

Indeed, simpler battlefield simulation projects have gotten mixed reviews from military leaders, according to Training Systems Report, a trade publication that follows the training and simulation business. A recent article said that a panel of military experts complained that war games simulation programs had numerous bugs.

In particular, they complained that numerous human factors were not taken into account, and that programs could not account for the mentality of the enemy.

Likewise, the National Air Traffic Controllers Association has been critical of the increasing reliance by the Federal Aviation Administration on simulation to train air traffic controllers.

During recent congressional testimony, the association warned that simulators "cannot teach a controller the intuition and feel for air traffic and for what a pilot may do."

Blackwelder and Stiles, however, probably wouldn't agree with that. To them, flying the simulator was as nerve-racking as flying the real thing. To prove their point, they pulled out a bottle of Pepto-Bismol after the flight to calm their nervous stomachs.