Author, illustrator, and film concept artist Victoria Ying has always known she wanted to write a graphic novel. So when the idea for City of Secrets (Viking, July 28) came to her—at first in a dream—she went through a process of “reverse engineering” the story in all its delightful permutations. The city of Oskars is a constantly shifting world operated by gears, levers, pulleys, and switches, home to orphan Ever and the bright, adventurous Hannah. After visiting Ever where he works, Hannah makes it her goal to befriend him, and during their trials with such villains as the assassin Vash and his cronies, the two make their way through Oskars as it navigates an incipient war with rival city Edmonda. City of Secrets is the first entry in a planned duology. We recently spoke with Ying on Zoom; the conversation has been edited for length and clarity.

Did you always want this to be a story for middle-grade readers?

I always knew that I wanted my characters to be middle grade–aged. But I thought if I ever sold it, people would want to age up the characters because the world is quite dark. I liked the idea that they were that age for a number of reasons. One, I really wanted this to be a friendship story and not a romance—that kind of friendship is something that is so well explored in middle grade, and we don’t really get to do that as much in older fiction, so I wanted to push to keep them young. We toned down the violence a bit from the original level into something more palatable. But there are assassins; their goal is to kill a child. So we kept a lot of the really dark stuff. I was really lucky to have everyone at Viking stand by me in my decision to keep them middle grade.

You navigate this world’s technological subtleties so fluidly; Ever uses a Rube Goldberg–like array of switches and levers to outsmart his enemies. When did you come up with the mechanisms that operate Oskars?

I wrote it as a prose novel originally because I thought, I don’t want to draw this. This sounds like an absolute nightmare. [Laughs.] Before I started writing this book, I worked in film and television as a concept artist. I worked on Elsa’s ice castle [in Frozen], figuring out what that looks like from the outside to the inside, making it all match. So I took that background and put it into building this city out of a model. I took pre-made models of three different clocks, exploded them, and then reconfigured them back together. I drew on top of that 3-D model so I could make sure that when I rotated it or altered it, the actual structure stayed the same.

There are certain gendered expectations of Hannah, paired with the futuristic inventions of Oskars. Does this story exist within a particular time frame for you?

I love the world of Edwardian England, so much of what happens with Hannah and her family is drawn from that world. Kids nowadays may not have as many gendered expectations, but when you’re finding your own self, you may not end up pursuing careers that your family would approve of. For me, that was art. My family was very supportive—they sent me to art school—but constantly were asking, “Are you sure about this?” That’s Hannah’s experience, and she’s exploring her own ways to solve that problem. I like having something to hold on to, because if it’s pure fantasy with nothing grounding it, it’s difficult for me to create a meaningful, believable world. Part of that is my background in film and entertainment, where reference is the first thing you need. I wanted this steampunk, Victorian feeling, and then what are the issues that a kid would face in that time period?

Madam and Vash are both such great villains. Did you have a literary inspiration when creating them?

Dickens is a big one. I really wanted them to feel bad. I love stories where you understand the point of view of the villain, but I also love children’s books, and middle grade especially, because we really do get to have that clear delineation between good and bad. That villain that you hate is something that I adore, and Madam—because I went to a Catholic girls school and was surrounded by these very strict nuns—she represents this strict adherence to order and control that has always been fascinating to me, because it feels like that’s what I’m constantly pushing against. Vash is more about chaos, a villain who’s completely against order. To have both of them in the same story has been very fun.

Johanna Zwirner is the editorial assistant.