Nicole Perlman’s interest in space started early — and with the help of real-life rocket scientists. When she was growing up in Boulder, Colo., in what she calls “a very nerdy family,” her father would host a science-fiction book club that counted among its members many employees of the aeronautics companies based in the area. The rocket scientists would come to her house and discuss their favorite books; noticing her interest, her father bought the 15-year-old Perlman copies of physicist Richard Feynman’s two autobiographies.

That fateful gift started Perlman, now 33, on a path that led to her writing Guardians of the Galaxy, in theaters Aug. 1. The movie is Marvel’s big leap away from its more established superhero properties into the depths of outer space. It’s also the first movie in the Marvel Cinematic Universe to have a woman as a credited writer — but getting there wasn’t exactly easy.

While in college, Perlman had written a script called Challenger about — no coincidence — Richard Feynman. The project garnered major acclaim and landed her on Variety‘s 2006 list of writers to watch. But the script never became a movie, and neither did any of the other projects — like a Neil Armstrong biopic and a Wright Brothers project — that came her way in its wake. And, though she felt pigeon-holed into the biopic space, she was having trouble getting where she wanted to be, which was sci-fi. That trouble was no coincidence.

“[Science-fiction movies] are the kinds of movies I enjoy watching, much as I really enjoy history and science,” she recalls, “but I was noticing that I was having trouble convincing people, when I was pitching on projects, that I would be capable of doing this. There was a little bit of an attitude of, ‘Well, you’re a woman, you’re not writing romantic comedies, we’ll give you the Marie Curie biopic.’”

She kept trying. She pitched one company a project with a sample that they loved, but they told her that even though they appreciated her take on the article they had optioned they weren’t sure she could write the more action-heavy parts. “They kept saying, ‘This is a guy’s movie, you know, it’s really a guy’s movie.’ I didn’t want to say, ‘Are you saying a woman can’t write a guy’s movie?'” Perlman recalls. “What is a guy’s movie anyway? If you’re making a movie that’s just for one gender, what’s the point?'”

That frustration was how she wound up at Marvel. Back in 2009, the company launched a writer’s program that sounds like something along the lines of the old studio system: several writers would sign on for a period of two years to work full-time on Marvel properties and see what happened. It was a risk, untested and defying the typical screenwriter schedule, which usually involves stacking several projects at different stages, and it came with no guarantee that anything would make it to production. But Perlman applied and decided that, when she got it, this was her chance to show the world that she could do it, to write science fiction at a company where risks could be taken (and where, during the filming of Iron Man explosions, the buildings would shake).

She was offered several lesser-known Marvel properties to focus on, and she chose Guardians, once again defying expectations despite its obvious match with her sci-fi propensities. She wanted a project where the “super”-ness of the heroes came from their personal histories and their planetary origins, not weird circumstances like radioactive spiders or chemicals.

“I can’t tell you what the other titles were that they were offering up on the table, but I can tell you that one of them was a little bit more appropriate for me, just based on gender,” she says. “I think they were a little taken aback when I chose Guardians, because there were ones that would make a lot more sense if you were a romantic-comedy writer or something like that.”

Perlman immersed herself in the Guardians universe — a more complicated feat than she had anticipated, given the sprawling world of the series — and spent two years writing a draft. “I was definitely the only woman screenwriter that I’m aware of,” she says, “but they never made me feel disenfranchised for being a woman, which I really appreciated because I definitely have felt that at other studios.” In late 2011, she was asked for another draft with a quick turnaround, and in early 2012, James Gunn, who shares the writing credit with Perlman and also directed Guardians, came on board to work on the script. That was pretty much the end of Perlman’s involvement with the movie.

But Guardians was already on its way to being the first Marvel writers’ program script to make it to production. (It’s not uncommon for a movie project like Guardians to have several rounds of writers, often more than are credited, as credits are determined by complicated guild regulations. Perlman herself has been in that situation: she worked on Thor while at Marvel without a credit, just as it’s possible that other female screenwriters before her time worked on Marvel projects without writing credits.)

Perlman’s not really part of the Guardians publicity machine — “There’s not a lot of reason for me to be out there on the promotional junket,” she explains — but it’s hard to believe that she would have time for it, anyway. Her IMDb page is unlikely to keep its one-project-only status for long, as she’s working on a feature film project with Cirque du Soleil, a TV project, a sci-fi adaptation of the book The Fire Sermon for DreamWorks and several other passion projects. She’s also on the steering committee of the Science & Entertainment Exchange, a National Academy of Sciences effort to encourage writers and other creative people to connect with real scientists for science-inspired projects.

Though she was done writing by the time Guardians began shooting, Perlman did get to visit the set — an experience she describes as comparable to telling someone about your dream and then seeing them recreate it based on their idea of it: surreal and amazing and full of things you didn’t even know you had thought up.

Including explosions.

“I like to think I can be just as good at blowing up things as I am at crafting relationships between characters,” Perlman says. “I went out of my way to try and tell a story that was a little more unusual because I didn’t want to bring anything that was weak to the table as a female writer. You don’t want to be a woman writer about whom people could say ‘a woman can’t write science fiction.’ I think that in that way it very much spurred me to do the best work that I could. But I didn’t add more romance because I was a woman or anything like that.”

That said, Perlman hopes that, despite reaching a gender milestone at Marvel, being “a woman writer” — as opposed to just “a writer” — is a time-limited thing. Of the attention being paid to comic-book Thor’s upcoming female incarnation and the new Miss Marvel (written by a friend of Perlman’s, G. Willow Wilson), Perlman says she sees why it’s important to pay attention to women making inroads in the comic-book world, herself included. But she hopes that attention is soon paid for other reasons. “I do still feel like it’s a little bit like, ‘Wow, it’s so crazy that a woman is doing this!’ I look forward to the time when it won’t be that crazy,” she says.

And there’s already evidence that that future is here: Perlman appeared on an all-female Comic-Con panel about science-fiction in Hollywood on Thursday, but the gender of its participants wasn’t mentioned in its title. “I thought that was so great, because that’s the obvious hook: like, put these women in a box and let’s all look at them! It’s just like these are people who are working and they all have stories to tell and they happen to be women,” she says. “I think we’re not there yet, but that’s where it’s headed.”

Write to Lily Rothman at lily.rothman@time.com.