Warner Bros. has made a deal for director Wolfgang Petersen to bring Orson Scott Card’s prize-winning series of science-fiction bestsellers “Ender’s Game” and “Ender’s Shadow” to the bigscreen.

Card will write the first script draft for a film Petersen hopes to direct. The author is embarking on a separate deal with the Warners Consumer Products Divi-sion to hatch a series of computer and videogames based on the futuristic series.

The “Ender’s Game” series begins as two alien attacks have nearly wiped out the human race and a frantic world government trains children for war by teach-ing them a competitive game that’s a cross between “Harry Potter’s” quidditch matches and “Star Wars” Jedi lightsaber battles. The best players become rivals vying to lead the world against the aliens.

“There is great potential for a variation of what I did with ‘The Neverending Story,’ which was about a little boy saving the world,” Petersen said.

Card originated “Ender’s Game” as a short story in 1977, and published the first novel in 1985, winning both the Hugo and Nebula awards. While the book spawned two novel series and has remained a favorite of sci-fi fans, Card has routinely nixed film offers that have been coming since the first book.

“Wolfgang completely understood the book, and my children grew up on ‘Neverending Story’ so I knew he could direct performances out of young children,” Card said.

The film will be produced by Petersen, Rob Chartoff, Diana Rathbun and Ted Ravinett, with Sam Dickerman and Lynn Hendee exec producing. WB execs Bob Brassel and David Beaubaire are steering the project.