Image copyright Wakaliwood.com

A Ugandan film company that makes low-budget action movies in the slums has found a cult following online - one US fan liked their films so much, he abandoned New York to become an action movie star in Kampala.

It was December 2011 and things were not going well for Alan Hofmanis.

"My girl dumped me the day I bought the wedding ring," he says. So a friend took him out to a Manhattan bar and, to cheer him up, showed him a video clip on his phone.

It was the trailer for Who Killed Captain Alex? billed as Uganda's first action movie. The minute-long video showed bloody gun battles, speeded-up kung fu fights and computer-generated helicopters bombing Kampala. If you looked closely, you could see that the machine guns - replicas of Rambo's M60 - had been welded from scrap metal, and the bullets carved from wood. Much of the action took place in mud. A high-pitched voiceover announced this was the work of Ramon Productions, and gave a phone number.

Image copyright Wakaliwood.com Image caption The replica of Rambo's machine gun, welded from scrap metal

The clip had an electrifying effect on Hofmanis. "Around 40 seconds into it, I decided: I'm coming to Uganda," he says. "I realised what I'm looking at makes no sense - but it's complete genius."

As programme director for the Lake Placid Film Festival, Hofmanis was used to spotting emerging talent, but he says what he saw here was "off the charts" in its ambition. "In the West, when you have no money, you shoot two people having a conversation… You don't make a war film."

Two weeks later he travelled to Uganda. He didn't bother to call ahead, his mind was made up.

On his first day in Kampala he was at a busy market, when, far in the distance, he spotted a man wearing a T-shirt that said Ramon Film Productions. He immediately gave chase. "I just start running, and I'm chasing him… so he starts running, but we eventually catch up, and we calm down, and I say: 'Look, I'm just a fan from New York City - can you take me to the film-maker?'"

The answer was, "Yes," so Hofmanis jumped on the back of a motorcycle and 30 minutes later arrived in Wakaliga, a slum on the outskirts of Kampala. "There are goats everywhere, there are chickens everywhere… That's raw sewage that's going right in front of the house - and that actually plays a major role in the films, because it's life here - it's dust, it's heat, it's children, it's animals… and it's pure joy," he says.

Image copyright Wakaliwood.com Image caption Film-maker Isaac Nabwana in action

Isaac Nabwana, the film director and brains behind Ramon Productions, was not fazed by the unexpected arrival. "I asked him, why didn't he call me? He said: 'I am a friend, I had to reach you.' That's when I realised that he's a true friend," he says. Nabwana offered his visitor some tea, and they spoke for five hours.

"I thought I was going to meet someone like myself - a little crazy with a camera and some friends - and very quickly I realised this is the real deal," says Hofmanis.

He had arrived in "Wakaliwood", where over the past decade, self-taught film maker Nabwana has shot more than 40 low-budget action films. He is not sure how much each one costs to make, but guesses it might be around $200 (£130). "It is passion that really makes a movie here," Nabwana says.

Media playback is unsupported on your device Media caption Behind the scenes - courtesy of Wakaliwood.com

The volunteer cast and crew source props wherever they can. The green screen is a piece of cloth bought at the market, draped over a wall. The camera crane is made from spare tractor parts - Dauda Bissaso, one of the regular actors, is a mechanic and builds all the heavy gear and weapons. "He's just a genius with a blowtorch, he makes everything," says Hofmanis. Another key member of the team is Bruce U, a Bruce Lee fan who choreographs the fight scenes and runs a kung fu school for the children of Wakaliga.

Image copyright Wakaliwood.com Image caption Supa kung fu Master Bruce U - his beard and moustache are attached with shoe glue

To recreate gunshot injuries, they use free condoms from the local health clinic, filled with fake blood - they burst quite realistically. They used to be filled with real animal blood, but when one of the actors got sick with brucellosis, a disease passed on from cows, they switched to food colouring.

Image copyright Wakaliwood.com

Fake blood is needed in vast quantities because the films are violent - but in a cartoonish way, and quite unlike the real violence Nabwana witnessed growing up during Uganda's 1981-86 civil war. "I don't put that in my movies, what I saw in the past," he says. "I include comedy - there was no comedy in the violence which I witnessed."

His cinematic hero is Chuck Norris, although he also likes Rambo and The Expendables. Hofmanis, on the other hand, compares him to directors like Guillermo del Toro, Robert Rodriguez and Martin Scorsese - "in terms of creativity and what they're contributing to cinema".

Image copyright Wakaliwood.com Image caption Isaac Nabwana and his biggest fan, Alan "Ssali" Hofmanis

Nabwana's love for films began long before he was allowed to watch any - his older brother Kizito would return from the local cinema hall and describe what he'd seen in vivid detail. "I remember the gestures he used… there was a guy who used to crush people, so I liked that," says Nabwana. "Even now I see them in my head."

At senior school, Nabwana decided he would make his own action movies one day. "I had that art in me, I wanted to make a movie - I had to fulfil that dream," he says.

But there was not enough money for him to even finish school. "So I started making bricks and digging sand to sell to people around here," he says.

Finally, in 2006, at the age of 32, Nabwana had saved up enough to pay for the first month of a six-month course in computer maintenance. "That was enough to know how to assemble a computer," he says. He then taught himself how to use editing packages such as Premiere Pro and After Effects, and borrowed a camera from a neighbour. "And with that I started… I did not know how to write a script. But then I thought of these drama actors, how do they do it? And I started figuring it out."

Image copyright Wakaliwood.com Image caption This replica wooden machine gun is veteran of about a dozen films

Tebaatusasula was one of his earliest successes - the name translates loosely as "They never paid us."

It mixes comedy, action and witchcraft - one character bewitches a man who has stolen his wife. "In Tebaatusasula things jumped out of the house... chairs, the TVs and everything, and people loved that very much," says Nabwana.

But his biggest challenge was yet to come.

Unable to find a distributor, Nabwana came up with an ingenious solution: the actors and crew work for nothing, but get to keep half the profits from any DVDs they sell. "We do man-to-man, door-to-door all over the country to sell them," he says. The films can sell for up to 3,000 shillings - about $1 - but the team only has a window of about a week before they are pirated. They sometimes wear full costume to maximise sales.

Image copyright Wakaliwood.com Image caption Selling DVDs in full costume can improve sales

It was on such a sales trip that they had bumped into Hofmanis.

As soon as they met, Nabwana agreed to write a role for Hofmanis, who felt like he was 10 years old again. "When I was a child, I would go through my father's closet, find two belts of his, tie them together, and now I'm Indiana Jones. And the trees are Nazis. That's what this is," he says.

So, two days after arriving in Uganda, he found himself filming a fight scene. It didn't quite go to plan. "I grab someone in the scene and we fall into the raw sewage and we start fighting there." He says everyone was amazed to see an American rolling around in sewage. "That in some ways was my baptism here. Only people who are from the slums behave this way - because they grow up with sewage it doesn't mean much to them." They honoured him with a Ugandan name: Ssali.

Image copyright Wakaliwood.com Image caption Children do kung fu poses in front of posters advertising the next Wakaliwood film

Sewage plays a part in all of Nabwana's movies. He purposely includes such details because he wants to reflect his surroundings - his films are from the slums, by the slum. It's part of their appeal. "What I've found out… is that people want to see what they live in. They want their life to be put on DVD. They like it very much," he says.

But he admits that this puts off distributors, whom he has accused of "trying to copy exactly what is done in the West and exactly what is done in Bollywood and Hollywood".

"I'm going to show the world the kind of life we enjoy or we grew up in," Nabwana said in an interview for the 2012 documentary Wakaliwood. "It's called a ghetto life but you know it's good… and it's hostile."

After that first trip in December 2011, Hofmanis visited six more times. Then in March 2014, the 45-year-old sold his possessions and moved to Wakaliga. "Back in New York I got rid of everything. I had put my stuff in storage but I couldn't even afford the $22 (£14) per month it cost," he says. "I'm all in."

Image copyright Getty Images Image caption Like the rest of the crew, Hofmanis gets involved in all aspects of production

"He's now part of my family," says Nabwana, 42, who lives with his wife Harriet and three children. Hofmanis moved in next door.

They have big plans for the studio. A Kickstarter fundraising project launched in March exceeded all expectations. "All we asked for was $160 (£105) to make a movie, but we got $13,000 (£8,500)," says Hofmanis.

They immediately went on a shopping spree, buying toy cars and trucks to blow up - the trick is to match them to what Bissaso can find in the local scrap yards, so they can be used for stunts.

Image copyright Wakaliwood.com Image caption The design for a spinning gun, inspired by the film Predator

The team spend a lot of time discussing weapons. Nabwana now plans to build a full-scale helicopter from scrap. He has a fondness for choppers, and remembers being chased by one during the civil war when he was about 12 years old. His brother's cinematic knowledge kicked in and they tried to outrun it - the helicopter followed. He chuckles at the memory.

Wakaliwood currently has six films in production, including Bad Black, a kind of reverse Karate Kid, starring the children of Wakaliga. And they are inviting fans from around the world to submit scenes for "the world's first crowd-sourced action film" - called Tebaatusasula: EBOLA.

Image copyright Wakaliwood.com Image caption The studio's kung fu school keeps children off the streets and trains them as future stars

Hofmanis describes life in Wakaliwood as a "lazy country afternoon punctuated by the unpredictable". As one of the few white men around, he's in demand as an actor. He has played Jesus in a chart-topping music video. For another role he had to crawl into a fresh goat's carcass "so when the cannibals plunge a knife into my chest they're pulling out the goat's intestines and not my own."

Image copyright Wakaliwood.com Image caption The moment Hofmanis realises a dead goat is his "costume"

But on his personal blog - Mud, Blood & Wooden Guns - he hints at darker moments. He has lost 55 lbs (25kg) in weight since he arrived 15 months ago. In October last year he compared his situation to the 70s cult thriller, Sorcerer: "I wound up in a third world country with no way to get home… It does not end well."

He has swapped a comfortable Western existence for life in a slum - without running water or plumbing, no sewage system and with barely any electricity. "People can be confused that they see us with internet - a 3G modem that I brought here - and making movies, so the default is it cannot be a slum," says Hofmanis.

"But that's the whole point. Wakaliwood should not be able to do what it does. But it's happening.

"The story is still being written. This is just the beginning, or the Beginning of the Beginning, as Isaac says."

But in the end, it may be Hofmanis' story that attracts Hollywood's attention.

Image copyright Wakaliwood.com Image caption An actor has lunch in full horror make-up

Image copyright Wakaliwood.com Image caption Bosa, the dummy used as a dead body in every film, was named after an actor who quit

Image copyright Wakaliwood.com Image caption Make-up test for a woman who turns into a snake

Isaac Nabwana and Alan Hofmanis spoke to Outlook on the BBC World Service Listen to their interview.

Going to the movies in Uganda

Image copyright Wakaliwood.com Image caption VJ Emmie at work in his video hall, which is near Wakaliwood

Watching a movie can be a raucous affair - films are translated into local languages such as Luganda by VJs, or video jokers, who add their own jokes and improvised commentary, live. "When you are translating the movie you have to feel like you are in the movie," says VJ Emmie, whose video hall can attract an audience of up to 200 for a live show. "We normally do not change the meaning of the film, but we spice it up."

Emmie wanted to be a VJ from the age of six, because he realised it would make him popular. "I went to the cinema hall and watched this guy translating a movie and the first benches around him - it was women. When I went back home I told my mother, 'I want to be a VJ' - mother wanted me to be a tailor."

Wakaliwood has now re-released Who Killed Captain Alex? with commentary by VJ Emmie.

VJ Emmie spoke to Outlook on the BBC World Service Listen again via the iPlayer or get the Outlook podcast.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.