'The Shining' prequel will be penned by Glen Mazzara.

'The Walking Dead' producer has signed on to write a film based on the spooky events which took place before the iconic 1980 psychological horror, starring Jack Nicholson and based on Stephen King's novel of the same name, Deadline reports.

'The Overlook Hotel' is due to be set in the same isolated hotel in which writer Jack Torrance (Nicholson) and his family move in after he takes a job as an off-season caretaker in Stanley Kubrick's original movie.

While his young son discovers more about the ghosts who inhabit the hotel, Jack gradually descends into madness and attempts to murder his family.

Stephen King - who wasn't a fan of the first film - recently revealed he wasn't happy with the idea of Warner Bros. making a prequel, but wouldn't stop it from going ahead because he is too ''nice''.

He told Entertainment Weekly: ''Am I eager to see that happen? No, I am not. And there's some real question about what rights Warner Bros. does still have. 'The Shining' is such an old book now that the copyright comes back to me.

''I'm not saying I would put a stop to the project, because I'm sort of a nice guy. I have a tendency to let people develop things. I'm always curious to see what will happen. But you know what? I would be just as happy if it didn't happen.''