Dan O’Bannon, whose screenplays for “Alien,” “Total Recall,” “The Return of the Living Dead” and other films made him a cult hero among science fiction aficionados, died on Thursday in Santa Monica, Calif. He was 63.

The Writers Guild of America confirmed his death. The cause was Crohn’s disease, a chronic gastrointestinal disorder that Mr. O’Bannon endured for 30 years, his wife, Diane, told The Los Angeles Times.

Mr. O’Bannon had an early start as a screenwriter when he and the director John Carpenter, students at the time at the University of Southern California film school, wrote the low-budget film “Dark Star,” which was released as a feature in 1974.

After working as a computer animator for the director George Lucas on “Star Wars” and trying, unsuccessfully, to develop a film based on the Frank Herbert novel “Dune,” Mr. O’Bannon created the story of “Alien” with the screenwriter Ronald Shusett and wrote the screenplay on his own.