With a mixture of bemusement and despair, the residents of Africa's last colony are watching from the sidelines as superpowers of the region and the world--operating from far-flung places such as Pretoria, Luanda, Washington, Havana and Moscow--decide Namibia's future.

While U.S. and South African diplomats spin optimistic visions of peace settlements and an era of good feeling between formerly bitter rivals in southern Africa, others here warn that peace and independence for this territory, which has been under South African control for 69 years, remain a long way off.

"I don't want to be optimistic," said Nora Chase, secretary general of the South-West African National Union, one of more than 40 local parties whose ideological and personality conflicts clutter the political landscape in Namibia, also known as South-West Africa. "In the final analysis, we don't decide our own fate. We're not even a tennis ball in the international power game."

Since Zimbabwe gained its independence four years ago, Namibia has topped Africa's diplomatic agenda, the last unwritten chapter in the demise of colonialism on the continent.

Despite its diamond and uranium deposits, this largely barren desert, twice the size of California yet with only 1.1 million people, has few material riches worth fighting for. But its psychological value has seemed to grow through the years, both to white-ruled South Africa, which sees it as the last buffer between itself and the radical, black-ruled nations to the north, and to the rest of the continent, who believe that once the Namibia question is resolved, the world can turn its gaze on South Africa itself.

For the Soviet Bloc, which has supplied the arms for the 17-year independence war Namibian guerrillas have fought here, the territory is a target of opportunity. For the West, it is a nagging problem that must be settled before it becomes a focal point for East-West confrontation.

But despite a new sense of urgency in Washington and Pretoria, recent history gives little cause to believe a solution is near.

Since 1977, when five western nations led by the United States embarked on a campaign to achieve its independence, Namibia's fever chart has shown peaks of hot optimism inevitably followed by deep, cold plunges.

"It seems that every time we get near the solution, new obstacles are created," said Nico Bessinger, a spokesman for the internal wing of the South-West Africa People's Organization (SWAPO), the main black nationalist pro-independence movement.

Bessinger and other critics pin most of the blame on South Africa, which they said has never really decided to let Namibia go. They also blame the United States, which in 1981 linked independence to the withdrawal of Cuban troops from neighboring Marxist-ruled Angola. That move, they say, gave Pretoria an excuse to delay and added complexities to one of the world's most complicated diplomatic puzzles.

Still others blame SWAPO, which has fought a 17-year bush war against South Africa and has been anointed by the U.N. General Assembly as the "sole legitimate representative of the Namibian people." These critics say they believe SWAPO's leaders have been more interested in maintaining their political primacy than in negotiating independence and that the United Nations has forfeited its role as peacemaker by endorsing the organization.

Pinning guilt for past delays has become an irrelevant exercise, according to western diplomats, who argue that independence is on the way now. They cite as proof South African Prime Minister Pieter W. Botha's Jan. 31 speech to Parliament, in which he said his country was tired of footing the bill--which he put at more than $1 billion a year--for Namibia's broken-down economy and for the war against SWAPO.

But the question is how. It is a question on which American and South African officials appear increasingly divided, and one that may yet cause a collision between the two countries, which so far have worked closely in conducting a regional peace initiative.

U.S. diplomats believe the only workable method for independence is the internationally recognized formula contained in U.N. Resolution 435, which includes a cease-fire between South Africa and SWAPO, a withdrawal of South African troops and their replacement by a U.N. force that would oversee an early election here. This plan, negotiated during a five-year period, is the only formula that has been accepted by all parties to the complex dispute.

"Resolution 435 is a painstakingly constructed edifice, and you can't start tampering with it or the whole thing can come down like a stack of cards," said one western diplomat, reflecting the American view.

Until now, the Americans have said that they believed their counterparts in Pretoria shared their view that 435 was crucial. But South African diplomats, while periodically restating their commitment to the resolution, have hinged their support to a commitment from the Angolan government to send its Cuban troops home.

South Africa contends that the Cuban troops could become more of a threat to it if South Africa no longer controlled Namibia as a buffer. But the departure of the Cubans is a prospect South African officials here reportedly see as highly unlikely. Without an Angolan pledge, they say, Resolution 435 is dead--and they will feel free to pursue other paths to independence.

While the South Africans remain vague about the direction other paths might take, it is clear they prefer a formula that would prevent SWAPO from coming to power or that at least would fetter it within a coalition government with rival parties more amenable to Pretoria's interests. This apparently would mean no early election, for most observers say they are convinced SWAPO would be the clear-cut victor if a poll were held in the near future. South Africa, they said, needs time to construct a rival political movement capable of braking SWAPO's drive to power.

But the construction of a strong rival to SWAPO has been one of South Africa's least successful strategies here in recent years. The most promising effort, the multiracial Democratic Turnhalle Alliance, which virtually ruled the territory's internal affairs for four years, found its popular support eroding as negotiations for independence dragged on, and collapsed last year.

Seven local parties, including a revived Democratic Turnhalle Alliance, have attempted to forge a new coalition called the Multi-Party Conference. But that effort is in trouble, in large part because of deep ideological divisions among its members.

The conference would like to persuade SWAPO to put down its arms and join it in formulating a new constitution. Instead, SWAPO appears to be successfully wooing some of the conference's members to quit.

SWAPO's leaders here are confident that as long as their movement retains its identity as a genuine liberation movement that has fought South Africa militarily, it will win any free election.

"There's a clear trend in African politics," said Daniel Tjongarero, the party's deputy national chairman. "Once you're seen as a collaborationist with the colonial power, whether your views are right or wrong, you're out."

Many of the local political parties here claim to hold South Africa in contempt--an attitude the South Africans increasingly are reciprocating--but most agree with Pretoria's distaste for at least some elements of Resolution 435. They are particularly unhappy about the provision calling for U.N. troops to replace South African forces here and monitor the election.

"My problem is if on the 15th of July planes land and thousands of U.N. blue helmets step off those planes, and maybe on another part of the apron South African soldiers leave, the psychological effect is going to favor SWAPO," said Dirk Mudge, leader of the Democratic Turnhalle Alliance, complaining about the General Assembly's endorsement of SWAPO.

American officials express optimism that some sort of accord with Angola can be negotiated that will send the Cubans home and force South Africa to honor its commitment to the resolution. In any case, one western diplomat said, "local political parties cannot change international agreements."

But the Namibians, who have watched U.S. diplomats stumble before, are less confident. "I think South Africa will let this country go, but I have the feeling it will take a long time," said Mudge.