A Brighton children's author has beaten off competition from David Walliams and Olympics Ceremony scriptwriter Frank Cottrell Boyce to win an award celebrating funny books for children.

Dark Lord: Teenage Years by Brighton-based games developer Jamie Thomson was chosen as the winner of the Roald Dahl Funny Prize for 2012 at a ceremony in London.

Thomson's book, which won the gong for the funniest book for children aged seven to 14, features a dark lord who unwillingly inhabits the body of a chubby teenager. It's the first in a new series featuring the trials of Dirk Lloyd in his bid to be taken seriously as an evil force on Earth.

Speaking after he received his award, Thomson said: "I really didn't expect to win. It feels really good.

"I thought, 'Great, I've been nominated', but I thought I'd no chance of winning when I saw the actual shortlist. I was comparing all the reviews they'd had on Amazon and things like that."

He added: "I couldn't believe it at first, but then ... it's wonderful. I'm sure it hasn't really sunk in, I suppose."

The award-winning author said it is important for adults to enjoy their children's books as it helps the process of encouraging children to read.

He said: "If you're reading it as an adult to a kid and it's boring, you're not enjoying it and it's no fun.

"If you both enjoy it together - I had a friend who did exactly that with his boy and they both had a good time.

"That really gets the kid reading, gets the kid enjoying it more and gets the adult and the child to bond, and that's a wonderful thing."

Now in its fifth year, the winners of the price each received £2,500 at the ceremony in the Unicorn Theatre.

This year's prize saw schools from across the country involved in the judging process with over 500 pupils selected to read the shortlisted titles.

The official judging panel included founder of the prize and former Children's Laureate Michael Rosen, comedian Mel Giedroyc, and journalist and author Lucy Mangan.