Glanville - a writer and fledgling director from Cardiff - was selected by the judges as submitting the best script from nearly 900 entries.
The competition, which was for newer and less experienced writers, was looking for a single half-hour TV script that is suitable to be watched across all ages. The competition was judged by Sitcom Geeks podcast hosts James Cary and Dave Cohen and producers from Hat Trick, the production company behind TV hits such as Father Ted, Outnumbered and Derry Girls. All entries were anonymous at the time of reading.
The winning script, Unsustainable, is about a hopeless collection of civil servants tasked with turning Wales into a net zero carbon economy by 2030. The logline is: "A minor, overlooked department in Natural Resources Wales is thrust into the spotlight when their tenacious manager Ava makes a bold announcement to the world about Wales environmental ambitions."
Glanville says: "In 2014 I left my job working as a production secretary because I wanted time to be more creative. I got a job at Cardiff Castle (which had the bonus of being a really interesting and cool place to work), started to study screenwriting and learned to write scripts. The first script wasn't very good. The second one wasn't great either but then the third was OK. After a few more I felt I was getting good and, to date, I've written 21 scripts including 9 sitcoms. Unsustainable was the first that got me any real attention, being selected in the BBC Writersroom Find Me Funny scheme. That led to me writing sketches for a few BBC Wales comedy shows. Last year I wrote and directed my first short film Cardiff, I Love You which was broadcast on BBC Four and is still available to watch on the BBC website."
He wins Hat Trick's £1000 cash prize, and will now undertake a development meeting with the company to discuss the project further.
Lloyd comments: "Unsustainable was the first script I wrote that made me feel like I might be getting the hang of this whole writing thing. To have it acknowledged by such prestigious voices in the world of comedy is genuinely heartening and a relief that my brief moment of self-belief was at least partly justified."
The Sitcom Geeks hosts say: "Judges always say 'it was so hard picking a winner from the shortlist' and they're right! The quality was exceptional. Unsustainable had everything we bang on about in our fortnightly podcasts: strong script, great story, compelling characters and funny jokes."
Hat Trick comments: "Lloyd's script felt like it could be filmed next week in terms of how polished it was; its world and characters are so incredibly rich, the structure is brilliant and it made every one of us laugh out loud. "
The shortlisted scripts in the competition were:
Albatross by Matt Elliott
An inconveniently real curse forces life-long sceptic Emma to seek the help of an eccentric occult society.
Castle Craven by Andrea Hubert & Ryan Cull
After publicly embarrassing the Huntington-Blythe family one too many times, entitled youngest son Evan is sent to run one of their least successful businesses, a failing tourist attraction called Castle Craven. Evan can't return to the family fold until he turns a profit - a job made tricky every day by the colourful characters who work there.
The Forger by Jack Nicholls
The true tale of 18th century knucklehead William-Henry Ireland, who, in a well-meaning attempt to impress his horrible antique-collecting dad, forges some documents by Shakespeare, fools all of Britain by mistake, and is forced to increasingly extreme lengths to maintain his moronic lie.
Gran's Here For The Summer by Ashley Joseph & Alex Hardy
A fun-but-forthright Gran moves into her daughter's family home, to "help" with the school holiday childcare. Her idea of "help" is breaking every rule set by her stressed daughter and sweet son in law - and sending her grandkids giddy with sugar. Could this summer break actually break this family?
Joy by Joe Barnes
Joy is a comedy about caring and kindness, following the fractious relationship between Joy, an elderly woman being moved into a care home and her put upon son in law, Rob.
Kicking Off by Chris Bartlett
The parents of an underachieving girls' football team battle each other and their own insecurities in order to be there for their daughters in time for kick-off each week.
Scrum Down by Kevin Latimer
An awkward teenage girl and her hot-headed best friend try to survive joining their school rugby team to avoid getting detention.
Sunny Sunny Southall by Ravi Chand
A single, late 30s Asian car park attendant's mother tricks him into legally agreeing to find a wife - if he fails, she'll transfer the deeds of the family home to the local temple!
Young And Scilly by Izzy Radford
Agnes is 21 going on 70 stuck on a tiny island and spending her days at Zumba or Boules with her elderly pals. She's decided it might be time to start living a little, whatever that entails...
Hat Trick say: "We were really pleasantly surprised by the quantity and quality of scripts submitted to the sitcompetition - everyone really ran with the brief of finding a family sitcom and it was genuinely difficult shortlisting and picking a winner. Thank you and well done to everyone who applied."
A new episode of Sitcom Geeks has been published today, in which the hosts talk more about the competition and what they discovered whilst reading through all the entries.
James Cary says: "The work that went into the scripts was very clear - and that's true of hundreds of the entrants. It's great to know that there are so many people out there willing and able to do the hard graft on a sitcom script, and I'm confident that there are more writers out there who will give us the next Only Fools And Horses, Porridge and The Office."