Malaysia and Indonesia both are fairly rich in natural resources (Indonesia with oil too), and still managed to do better than most newly independent African states. The determinant can't just be population or size given that Indonesia has a fairly massive population and population density (the latter being higher than any African country today except Nigeria or Burundi) despite being the 15th largest country on Earth. Is it possible to increase colonial guidance towards independence in Africa to the same levels as Southeast Asia?
I'm just going to focus on the former since I know more about it than on Indonesia.
The thing is that... well... the colonial powers didn't
exactly treat their colonies equally, and it
really showed in how the British treated Malaya. India was their crown jewel, but Malaya and Singapore formed their "Pearls of the Orient". For one thing, it's infrastructure was well-built for the time to export the Peninsula's resources; From what I can gather from my high school books, 1900's Malaya supplied a whopping
55% of the world's tin and
53% of the world's rubber, and extracting, refining, and transporting these raw materials meant that a substantial amount of investment had to go to infrastructure building, up to and even over what was the norm for colonies at the time. Otherwise, none of that stuff could get out there in such huge numbers.
Second was the urbanization. Malaya didn't have the population density of, say, London, nor did it have large cities. But the distribution of resources and the need for workers lead to massive use of contract workers and migrants, creating new towns and expanding existing ones, making it easier for like-minded individuals to seek out and form nationalist clubs.
Thirdly, and perhaps most importantly, Malaya was well connected to the world even for the standards of the time. Those contract workers I mentioned earlier? They came from India and China, and it wasn't long before the ideas of the Kuomintang and the Indian National Congress filtered across borders and seas (the founding father of China, Sun Yat-Sen, visited Singapore many times over in his life). The Malay middle-class also played a part; sending their sons to the Middle East to be educated. As early as the end of WWI, there were Malay scholars coming back from Egypt and the former Ottoman Empire discussing reforms and women's emancipation with their village imams. This, added with the Malay rulers' own penchant for reform and education (I'm looking at you, sultan Abu Bakar of Johor) created a larger intellectual class more attuned to the outside world than previously seen before.
And there were loads of other factors influencing pre-Independence Malaya, such as the Emergency, the inter-ethnic fights/cooperation, etc. , but there were the ones that stood out the most.