URBANA, Ill. — It was 10 p.m., and we were locked in a room at the mall.

It had been a long day. I had woken up at 5 that morning to finish writing an article. Then I had spent a day talking to University of Illinois students and professors. The physics department had invited me and two other science writers to visit, part of an effort to help science and engineering students better explain what they do.

I had had a few glasses of wine at dinner.

And now here I was in a locked room at Lincoln Square Mall, straining to recall my ancient physics education in order to get out.

The four of us — me plus Phillip Schewe, a longtime science writer; David Ehrenstein, an editor at the American Physical Society; and Karin Dahmen, a physics professor at the University of Illinois at Urbana-Champaign — had an hour to figure out everything about a missing scientist.

The fate of the free world was at stake. Of course. This video laid out our mission.

Video

CreditCreditLabEscape

Such “escape rooms” have become popular in recent years — immersive games where you and your friends (or strangers) search for clues and solve puzzles to defuse a simulated danger before time runs out.

Paul Kwiat, another University of Illinois physicist, is the creator of this particular escape room, which is one of the few, perhaps the only one, filled with puzzles that are based on science.

“Science can be fun,” he said. “Normally, people don’t include science and fun in the same sentence.”

Four years ago, Dr. Kwiat, who studies how to harness the properties of light for future quantum computers and encrypted communications, was attending a conference in Switzerland. He looked online for something fun to do in the off hours.

The destination with the highest rating on TripAdvisor was not a hiking trail or something historical or cultural, but an escape room. He and a colleague went. Neither had been in, or out of, an escape room before.

“It was superfun,” said Dr. Kwiat, even though they were unable to solve all of the Sherlock Holmes-themed puzzles in the allotted time. On the same trip, he did another escape room, in Prague. (He’s now done 25.)

Image

LabEscape's modest mall storefront. Players who can’t solve the science puzzles and leave are banished to “the quantum realm” — game over.CreditLyndon French for The New York Times

He thought that someone ought to devise an escape room with science puzzles, and when the American Physical Society put out a call for “innovative outreach,” he started working on one himself.

For his girlfriend’s birthday, Dr. Kwiat put together a small test version. In the spring semester, he recruited undergraduates in a class he was teaching to refine the puzzles and build more rugged copies of them. He leased space in the mall, a former baby goods store.

He put together a story: The fictional Professor Alberta Schrödenberg has made a breakthrough in quantum computing while working for a government agency, the Disruptive Technology Office. But she was worried that enemy agents were closing in to steal her discovery.

Then she disappeared, leaving behind a secret laboratory with mysteries to be solved.

“For me, the best escape rooms are the ones with a good story line,” Dr. Kwiat said. “There’s a good reason you’re locked in a room, and there’s a good reason why there are puzzles, and there’s even a good reason why there are people giving you hints to those puzzles.”

In January 2017, LabEscape opened. (The $10,000 grant from the American Physical Society arrived four months later.) Some 4,700 people have now passed through. Dr. Kwiat has created a sequel scenario as well as a transportable prequel that he has taken to physics conferences.

Before entering, we were given several sheets describing some basic properties of light. We skimmed over information about different wavelengths of light, including radio waves and X-rays, and the law of refraction describing how light bends when entering a material like water or glass.

Dr. Kwiat said that it was not essential to memorize all of that knowledge, but good to look over and keep in mind.

Image

Encouraging words on the walls of LabEscape.CreditLyndon French for The New York Times

Image

Dr. Paul Kwiat, the impish physicist behind LabEscape.CreditLyndon French for The New York Times

Into the room we went.

As it turned out, a background in physics does not necessarily help. I’m a former graduate student who left Illinois a quarter century ago without my doctorate after deciding I was better at asking other scientists what the answer was.

Both David Ehrenstein and Phil Schewe finished Ph.D.s before also deciding they preferred the communications side of physics. And Karin Dahmen is a working physics professor.

But we lacked traits of accomplished escape room devotees. That included methodical organization — take an inventory of everything in the room — and focus. Communicate clearly with your teammates; don’t get distracted.

Dr. Schewe, for example, started browsing a stack of old Physics Today magazines in a bookcase. “Phil!” I said, exasperated. “Stop looking for your articles!” (Tip: Do not squander time reading the magazines. But you may want to take a careful look around there.)

In devising LabEscape, Dr. Kwiat came up with sleights-of-vision that seem like computer- generated special effects but instead manipulate phenomena of real materials.

To avoid spoiling the puzzles for future lab escapees, consider instead a plastic tank that once hung in LabEscape’s welcome area.

There, Dr. Kwiat took advantage of the optical alchemy of acrylic and corn syrup.

At first look, the tank was clear and seemingly empty. But put on a pair of 3-D IMAX glasses, and three-dimensional letters spelling LabEscape, fringed in psychedelic colors, suddenly appeared before you.

The tank was not empty, but filled with 18 gallons of corn syrup. The letters, made of acrylic, were also in there. But because the two materials possess roughly the same index of refraction, light passed from one through the other without bending, and the letters were almost invisible.

But corn syrup is also what scientists call “optically active,” because of the shape of its sugar molecules.

Polarized light — where the oscillating electric fields of the photons are lined up in parallel, like airplanes flying in formation — was directed into the tank. As the light passed through the syrup, the polarization rotated. (Think of the planes doing barrel rolls in synchrony.)

Image

A 3D clock at LabEscape.CreditLyndon French for The New York Times

Image

Dr. Kwiat demonstrating a Tesla coil.CreditLyndon French for The New York Times

Blue light rotates about twice as much as red light. Because acrylic is not optically active, the rays that passed through the letters — and traveled through less of the syrup — had a different orientation.

Your eyes do not perceive polarization, but a polarizing filter in the IMAX glasses turned the invisible colorfully visible.

The sign is no longer there, because Dr. Kwiat overlooked another basic property of corn syrup — it’s denser than water. Under the strain of the extra weight, the plastic ruptured, unleashing a sticky deluge.

The escape room has been a learning experience for Dr. Kwiat in other ways.

One puzzle involves extracting a key to open a lock to get to another clue. Dr. Kwiat designed the solution, but was surprised when a participant figured out an alternative way of getting the key.

Then someone figured out a third way, and someone else figured out a fourth way. Eventually, he stopped being surprised. Now, escape room players have come up with 18 different ways of fishing out the key.

A debriefing after you finish your time locked in the room yields some fascinating tidbits. Did you know your digital camera can capture infrared light that your eyes cannot see? I didn’t.

And there really was a federal agency called the Disruptive Technology Office. Dr. Kwiat even got a grant from it.

But he isn’t expecting people to emerge educated about the index of refraction or how a laser works.

“There’s a great sense of triumph when you overcome one of these puzzles,” he said. “Just as in science.”

Image

Glasses reveal secret messages on a monitor.CreditLyndon French for The New York Times

Erica Phillpott, a receptionist at a fitness club, took her six children, ages ranging from 10 to 19, into LabEscape. At first, as she was looking at the sheets of science information, she was nervous.

“I just paid this man to add extra stress to my life,” she recalled thinking. “None of us really knows anything about science.”

But Ms. Phillpott and her children made it out of the room. “We saved the world,” she said.

Afterward, her 12-year-old daughter, whose birthday they were celebrating, got more excited about science. She now thinks she would like to study forensics or something similar.

“She really got the most out of it,” Ms. Phillpott said.

Even with the turnover of students at the university, there probably are not enough customers to keep LabEscape in business in Urbana indefinitely.

Dr. Kwiat envisions moving it to a science museum in a larger city and hopes that a company investing in quantum computing research — Google, perhaps, he said wistfully — might sponsor it.

The goal would not be to get people at a science museum to try an escape room, but the reverse: to entice escape room aficionados to visit a science museum.

As for the three science writers and the physicist, we, um, did not solve all of the problems and, when our time ran out, were banished to the “quantum realm.”

Kenneth Chang has been at The Times since 2000, writing about physics, geology, chemistry, and the planets. Before becoming a science writer, he was a graduate student whose research involved the control of chaos. @kchangnyt