Tension filled the wheelhouse of the 250.000-ton Texaco supertanker as it laboriously inched its way at three knots into the fog-shrouded harbor.

At this speed, a full stop signal would mean that it would take the ship two miles to lose its momentum. A miscalculation of a few hundred feet would drive the ship aground and spill thousands of gallons of crude oil.

Hands clasped behind his back, master Wallace McCollough paced the bridge, grumbling and wondering aloud why cold winter rain always seems to be falling at the deep water port of Milford Haven, Wales.

A foghorn sounded its dirge-like admonition, and a loudspeaker crackled with ship-to-shore messages warning of the vagaries of the sea - currents and tide movements and swells. Shore beacons and furiously bobbing bouys blinked brightly through the port and starboard windows of the bridge.

Suddenly came a crisp order from the master: Stop all engines and bring the wheel admidships.

As the telegraph clanged the order to the engine room, fluorescent lights blinded to life above the bridge, the horizon abrouptly vanished - and a facade of props and scaffolds appeared through the windows.

Cap. James G. Stillwaggon, a gravel-voiced pilot, eased off his swivel chair and away from a button-bedecked console and allowed, "Not bad, mates, not bad."

The high-seas adventure ended, incongrously, in a cavernous airplane hanger off a remote taxiway at LaGuardia Airport's marine air terminal.

The scenario was created by an experimental, computerized shiphandling simulator unveiled today by Marine Safety International Inc. The first ships' masters to try out the device gave it a high rating.

McCollough, who has been at sea for 30 years and a master for 11, said, "You don't take a ship like mine out and practice dangerous situations with millions of dollars of equipment. But with this thing, you can say to yourself, I'd like to try a procedure just once, to see how it works. What's there to lose?"

The simulator, housed on two floors of a Flight Safety International Inc. hanger, includes a fully equipped ship's bridge from which officers can look out upon a panoramic reproduction of their bertbing port, replete with minute details of land and water.

The purpose of the equipment - apart from providing a potentially profitable sideline for Flight Safety - is to refine the skills of harbour pilots and ship masters and reduce the number of oil spills resulting from groundings and collisions in port.

Texaco, which operates one of largest fleets of oil company-owned supertankers, has contracted to train more than 300 bridge officers at the new facility. It began training today, the first company to do so.

The heart of the simulator is a minute, wide-angle television camera the size of a 25-cent piece.

Is slowly "tracks" across the face of a 15-by-30-foot geographic model board of the harbor.

The board, with a 2,000-to-1 scale of the topographical features of the harbor - including lighthouses, piers, jetties, cliffs and islands - was handcrafted from thousands of photographs and charts made at the scene.

The camera moves across the model board in response to helm and engine orders from the bridge and transmits video signals to three projectors below the wheelhouse, within project life-sized images onto a 140-degree azimuth screen.

The ship control insturments in the wheelhouse are linked with a computer system that takes into account the hydrodynamic characteristics of the specific ship being simulated - including the location of the wheelhouse in relation to the bow, the beam, the length, the power and other characteristics.

The computer is also programmed to take into account the currents, winds, visibility and tides of the port being simulated.

It can also simulate emergencies, such as rudder and engine failures, radio and navigational equipment malfunctions, impending collisions.

In today's demonstration, McCollough took his medium-sized supertanker into Milford Haven, showing how tricky it is to navigate a ship that draws 67 feet of water in a channel 75 feet deep.

"Here, on the simulator, everything is perfectly safe. In real life, howere, you can tear the bottom out," said McCollough, as he barked orders to his helmsman.

As he spoke, the instructor - playing the role of a harbor control operator - announced over the loudspeaker, "Today is Guy Fawkes Day in this port. I'm sorry, we have no tugs." McCollough replied, "Shall de have a prayer meeting?"

Capt. Douglas Hard of Marine Safety, a former Navy and Merchant Marine captain, acknowledge that most of the firm's clients are likely to be the large oil-company-owned fleets, while small charter shipping firms - which have been responsible for most of the serious oil spills - may feel they can't afford the service. Marine Safety officials declined to say how much the week-long training sessions calling the fee "negotiable."