Roy Hoopes, 87, a longtime Washington journalist who wrote an acclaimed biography of crime novelist James M. Cain and more than 30 other books, died of pneumonia Tuesday at AAA Atrium Classic Assisted Living in Silver Spring, Md.

The very definition of a professional writer who lived by his typewriter, Mr. Hoopes contributed to hundreds of publications and held many jobs with magazines, newspapers, and federal agencies.

He wrote books about the Peace Corps, the steel industry, politics, sports, and Hollywood, but he was best known for his 1982 biography of Cain, who wrote the hard-boiled classics The Postman Always Rings Twice, Mildred Pierce, and Double Indemnity.

After Mr. Hoopes read an article Cain wrote for the Washington Post in 1975 about columnist Walter Lippmann, he found the all-but-forgotten novelist living alone in Hyattsville, Md. Mr. Hoopes wrote a profile of Cain for Washingtonian magazine and talked extensively with Cain before the 85-year-old author died in 1977.

Among his many jobs, Mr. Hoopes was the first managing editor of Washingtonian magazine in 1965, an associate editor at National Geographic, and managing editor of High Fidelity magazine. He was a Washington correspondent for Playboy and, from 1987 to 1998, the Washington bureau chief of Modern Maturity magazine. - Washington Post