A manuscript revealing Charlie Chaplin's first shot at a "talkie" has come to light in the family archives.

Fifty handwritten pages outline the dialogue for a satire on colonialism, inspired by the British-born star's visit to the Indonesian island of Bali in 1932.

Chaplin agonised over his future in a new world of film sound, and the manuscript reveals his initial faltering steps in dialogue. He planned a film, titled Bali, lampooning European arrogance on the paradise island and the invasion of a people's idyllic life. He poked fun at colonials taxing natives to build roads they did not need and making them harvest more rice than they could eat.

Chaplin was the comic genius who created the little tramp, society's eternal victim, with derby hat, toothbrush moustache and impossibly large boots – one of entertainment's most universally recognised characters. But, within years of classics such as The Gold Rush, he was struggling to adapt a craft fine-tuned from music-hall pantomime to cinematic sound.

As if in denial, he was still making silents or films with sound but no dialogue when talkies were already wowing audiences. He released City Lights in 1931 well after the first talkie, The Jazz Singer, and after All Quiet on the Western Front.

Cinema's new era took its toll on his confidence. Astonishingly, he even contemplated giving it all up to become a British MP. Years later, he recalled: "Although City Lights was a great triumph … I was obsessed by a depressing fear of being old-fashioned."

It was only in 1940 that he made his first talkie, The Great Dictator, his masterpiece satirising Hitler. David Robinson, the definitive Chaplin biographer, believes that the Bali manuscript – which he describes as "a new and unknown Chaplin project" – may be his earliest attempt at a talkie, although Chaplin wrote dialogue for City Lights that was never used.

News of the Bali manuscript was released to the Guardian by the Association Chaplin, founded by the family, which has just authorised the publication of some of his unpublished writings in collaboration with the Cineteca di Bologna, a centre specialising in silent and long-lost films. Kate Guyonvarch, the association's director, said the family knew of the manuscript and had decided to share it with the public. She said: "I had always assumed that when Chaplin had finished City Lights, he just had a long holiday. I now realise that this was a crucial crisis point in his life."

Chaplin visited Bali with his brother, Sydney, who was keen to film the island's topless women.

Chaplin was charmed by other aspects of the island. Fascinated to learn that the natives worked only a few months in the rice fields, devoting the rest of their time to culture, he wrote: "From these people one gleans the true meaning of life – to work and play – play being as important as work to man's existence. That is why they are happy."

Dutch interference with their way of life inspired him to write at speed across lined yellow pages, repeatedly reworking scenes. He saw the comic potential of locals paying taxes for roads. In one passage, the island's king says: "If we want roads, we can build them ourselves like we build everything else, without taxes, without gold."

In another, a native wonders what the colonials do with their gold: "You never see them wear it on their necks or their wrists." Somebody answers: "They wear it in their pockets. It's a wonder it doesn't tear their two-legged sarongs."

Neither side understands the other. A colonial says: "A country as rich as this is all going to waste on a lot of savages."

Chaplin also included a trademark love affair between a prince and a low-caste girl. Guyonvarch thinks Chaplin might have played the king or a colonial.