Six years into my career as a children’s novelist, I was in need of a big story. My 100 Cupboards trilogy was off wandering the world in various translations, and I was hoping to wrap up The Ashtown Burials series the following year. And then what? Nothing. The calendar was empty. The future was blank. A new and strange uncertainty hung over my notebooks and bulletin boards.

I caught a nasty virus and went down hard, sweating and helpless with fever. The experience was as miserable as such sicknesses tend to be, right up until the increased brain heat brought me the strangest dream. By the time the fever broke and I was able to join my family at the dining room table, I had a new story ready to be pitched to my offspring.

Kids, meet Sam Miracle. He lives in a ranch outside of Tucson and he’s traumatically disabled, both mentally and physically. Sam struggles constantly with memory loss, he has daydreams of adventures in which he always dies, and his arms are so badly damaged that his elbows won’t bend.

My horrified children stopped eating and began straightening their arms in curious sympathy. So far, so good. They were gripped, breathing the heat of the desert while Sam was hunted by a San Francisco banker turned time-hopping arch-outlaw. They felt Sam’s extreme pain when his rigid arms were brutally shattered and he wavered on the edge of death. And then, when I told them how his arms were not only saved, but became faster than any arms had ever been before, they were so rapt they were barely breathing.

Two live rattlesnakes were grafted into Sam’s arms—one nice, one mean. He rattles whenever he’s surprised or scared, and his hands now have minds of their own. His right arm is out of control and perpetually distracted. His left arm wants to kill him and everything else it can reach.

Over dinner, spawned by a fever dream, Outlaws of Time was born. It’s a scary book, and the scariness is no accident. This story is a safe place that—at times—feels unsafe, a place where young readers can experience vicarious fear and practice vicarious courage, where they can watch new friends sacrifice and become heroes.

I write violent stories. I write dark stories. I write them for my own children, and I write them for yours. And when the topic comes up with a radio host or a mom or a teacher in a hallway, the explanation is simple. Every kid in every classroom, every kid in a bunk bed frantically reading by flashlight, every latchkey kid and every helicoptered kid, every single mortal child is growing into a life story in a world full of dangers and beauties. Every one will have struggles and ultimately, every one will face death and loss.

There is absolutely a time and a place for The Pokey Little Puppy and Barnyard Dance, just like there’s a time and a place for footie pajamas. But as children grow, fear and danger and terror grow with them, courtesy of the world in which we live and the very real existence of shadows. The stories on which their imaginations feed should empower a courage and bravery stronger than whatever they are facing. And if what they are facing is truly and horribly awful (as is the case for too many kids), then fearless sacrificial friends walking their own fantastical (or realistic) dark roads to victory can be a very real inspiration and help.

With five children of my own (currently aged between 6 and 14), I live within a perfect focus group. Like many parents and teachers and librarians, I often look into a pair of eyes and hear the question, “What should I read next?” At any given moment, a dozen books are being consumed in our home: My kids are off wandering in Narnia or Middle Earth, making friends with Anne of Green Gables and The Penderwicks, exploring “The Wingfeather Saga” or the vivid pages and volumes of Amulet. Stories are being shared, told, and revisited all the time in our house, and when I venture out on tour or into schools, I meet thousands of kids who are off on the same fictional journeys as my own.

Overwhelmingly, in my own family and far beyond, the stories that land with the greatest impact are those where darkness, loss, and danger (emotional or physical) is a reality. But the goal isn’t to steer kids into stories of darkness and violence because those are the stories that grip readers. The goal is to put the darkness in its place.

When my eldest was first reading C.S. Lewis’s Chronicles of Narnia on his own (at around the age of 7), he encountered an ink illustration of the White Witch’s evil band drawn by Pauline Baynes. Cue the nightmares. He couldn’t go on reading, and every time he slept, he saw those creatures coming to life and pursuing him.

In the wee hours of one nightmarish encounter, I realized that I had two choices. On the one hand, I could begin sheltering him from every single thing that his rich imagination might magnify and enliven into terror. This was my protective paternal impulse, but it seemed as impossible as it was short-sighted. I would be facilitating the preservation of his fearfulness.

My other course was to try and embolden his subconscious mind. I carried my son into my office and downloaded an old version of Quake—a first-person shooter video game with nasty, snarling aliens 10 times worse than anything drawn by Pauline. I put my son on my lap with his finger on the button that fired our pixelated shotgun, and we raced through the first level, blasting every monster and villain away. Then we high-fived, I pitched him a quick story about himself as a monster hunter, and then I prayed with him and tucked him back into bed. A bit bashfully, I admitted to my wife what I had just done—hoping I wouldn’t regret it.

I didn’t. The nightmare never shook him again.

Jump a few years and four more children. My youngest daughter (pig-tailed and precocious) was devouring all sorts of sweet little books. At her insistence, I even wrote a pair of board books just for her (Hello Ninja and Blah Blah Black Sheep) and we spent lots of time making up stories together about winged puppies. Despite all that wholesomeness, she entered a very dark period during which she was inexplicably haunted by dragons. Vivid dragons, coiling and shadowy, able to emerge from her bedroom wall with dripping jaws. For a couple of weeks, if a night passed without a nightmare, my wife and I rejoiced. We tried to track where the dragons might be coming from—fully prepared to discard whatever book or film or show might be causing such regular terror. But the root was nowhere to be found … until one Sunday at church (in a high school gymnasium) my daughter looked over my shoulder and sighed.

“Well, there’s my nightmare,” she said.

Turning, I saw it—a wriggling, snarling, slavering dragon squaring off with a mascot knight on a high school pep banner.

My relief was instantaneous. That evening, I told her one of the scariest, funniest, most violent bedtime stories ever. I got the dragon description just right, and boy, did that serpent lose big. He died for good, right along with her nightmares.

I’m not interested in stories that sear terrifying images or monsters or villains into young minds—enough of those exist in the real world, and plenty of others will grow in children’s imaginations without any help. I am interested in telling stories that help prepare living characters for tearing those monsters down.

I don’t write horror. But I do write stories about terrified sheltered kids and fatherless kids and kids with the ghosts of abuse in their pasts. Those kids encounter horrors—witches and swamp monsters, black magical doors and undying villains, mad scientists and giant cheese-loving snapping turtles. Those kids feel real pain, described in real ways. They feel real loss. They learn that the truest victory comes from standing in the right place and doing the right thing against all odds, even if doing the right thing means losing everything. Even if doing the right thing means death. My characters live in worlds that are fundamentally beautiful and magical, just like ours, in worlds that are broken and brutal, just like ours. And, when characters live courageously and sacrificially, good will ultimately triumph over evil.

I’m not trying to con kids into optimism or false confidence. I really believe this stuff. My view of violence and victory in children’s stories hinges entirely on my faith. Samson lost his eyes and died … but he has new eyes in the resurrection. Israel was enslaved in Egypt, but God sent a wizard far more powerful than Gandalf to save His people. Christ took the world’s darkness on his shoulders and died in agony. But then … Easter.

In the end, good wins. Always.

There’s a time for amusement, for laughter and farcical tales. There’s absolutely a time for escapism and comfort and wish fulfillment (especially in the middle of a dark tale). There’s a time for sibling drama and humor and stories of shy heartbreak and school pressures. Intense and suspenseful pulse-pounding tales aren’t the one true diet for young readers. But I absolutely believe them to be healthy for growing imaginations, as essential as protein and calcium for young bones and muscles.

My children have only ever known me as a writer. When the older three still toddled, I was always plinking away on a keyboard in the corner of their playroom. By the time all five were fully aware, I was writing in an office at the end of a long attic with bunk beds tucked into dormers. Their night-light was the glow beneath my door, and when someone couldn’t sleep or a dream took a bad turn, I was the closest port in the storm. As it turns out, five children can produce worries and fears and dreams in bulk, and I’ve spent many hours fighting story with story.

In our house, when a day has brought struggle or pain or frustration, when we’ve stood at a deathbed or beside a new grave, we gather together, we sit down and listen. We assess characters and choices, villains and themes. We talk about darkness, we talk about light. We talk about loss and bittersweet victory. We talk about winter and spring resurrections. And through all of this talking, my children have learned, the most important stories are the stories we live.

The rest are all food for the journey.