Jim Carrey is set to play a villain in the new Sonic the Hedgehog movie.

The 56-year-old actor is reportedly in talks about taking on the role of evil Doctor Eggman Robotnik in the upcoming live action/CGI film based on Sega's video game, Deadline reports.

Last month it was revealed that James Marsden had joined the cast of the movie but details about his character are under wraps.

Neal H. Moritz is producing the animation under his Original Film banner, while 'Deadpool' director Tim Miller will serve as executive producer alongside Toby Ascher, and Dmitri Johnson and Dan Jevons will co-produce.

The speedy blue video icon is to be the focus of the new film by Paramount - who secured the rights to the character late last year after Sony failed to come up with a reason to use Sonic - and Sega.

Though details about the production are slim, filming is reportedly set to begin in July, with it slated for release between November and December.

Haruki Satomi, the president of Sega, Sammy Holdings, confirmed to CNBC: ''We can bring Sonic to the next level and not only bring the Sonic game to existing fans, but we try to grow our fan base worldwide.''

The movie will focus on Sonic and his friends, including Knuckles and Tails, as they try to stop the evil Doctor Eggman Robotnik.

Miller said: ''Jeff is an incredible director with strong story instincts.

''The world of Sonic presents the perfect opportunity for him to leverage his experience in animation to bring new dimension to this iconic character.''

Sonic has previously appeared in a number of animated series including 1993's 'Adventures of Sonic the Hedgehog' as well as a cameo in 'Wreck-It Ralph'.

Sonic is also one of the biggest video game characters, with games featuring him having sold 350 million copies over various gaming platforms.