Spoiler alert: The following account contains major plot details from Season 1 of Westworld. If you haven’t seen it, reading further will definitely ruin it for you — freeze all motor functions! To refresh your memory, check out our season finale recap.

DUBAI — If you thought Westworld was an exhausting, often frustrating — and ultimately vain — exercise in trying to solve an intricate TV puzzle, imagine being in the cast.

Virtually none of the actors knew quite where the HBO show’s time-hopping story was going until it became a need-to-know situation — not even Jeffrey Wright, who plays Bernard, the character with more twists and turns than any other.

Trying to make sense of Westworld was no easier for its stars during production than it was for the average fan during its airing, Wright said this week during a Q&A session at the Dubai International Film Festival. Any attempt to divine the intentions of showrunners Jonah Nolan and Lisa Joy was a waste of time and energy.

"That is dangerous territory, to try to stay ahead of them and anticipate where they are going," said Wright, who was joined onstage by co-star Luke Hemsworth at the Souk Madinat Theater in Dubai’s sprawling Jumeirah resort. "It only leads you to looking really foolish."

Stubbs (Luke Hemsworth) and Bernard (Jeffrey Wright)

Wright said the show’s husband-and-wife bosses were stingy with specifics until the very moment it became critical for the actors to understand where their arc was going for the sake of their performance.

"They filled me in on the broad brush-strokes of what my character was after the pilot," Wright said. "So I didn’t do a whole lot of guessing. But there were a whole lot of people out there scrambling to figure out all these theories. As fans do, we in the cast did. And they generally looked pretty foolish at the end of the day."

When it came to information, there were haves and have-nots

The nuance of Wright’s performance as Bernard (who we come to learn in Episode 7 is actually a host based on park co-creator Arnold) required that he be told of his secrets earlier than anyone else. And that meant keeping mum.

Luke Hemsworth and Jeffrey Wright speak on stage during the "In Conversation" on day five of the 13th annual Dubai International Film Festival held at the Madinat Jumeriah Complex. Image: Getty Images for DIFF

"I enjoyed hiding secrets from everyone," Wright said. "Each of us had our own little storylines that were hidden from one another. But Jonah and Lisa were touchstones for everyone; obviously it’s a very complex show, and while there were those of us who knew where our arc was heading, we didn’t know the full arc of where each others’ storylines was heading. So they’d be on set, and when we shot — Jonah and Lisa would be on set no matter who was the director — we set up the scene. Because we would have questions about the scene, like OK, where am I? When am I? And so they would make sure all those questions were answered and make sure we were all cool and then head off back to the writer’s room."

Hemsworth said keeping the show’s secrets wasn’t a burden at all — rather, it was "part of the fun."

"I made a point of keeping my wife in the dark about it, so I got to sort of see it unfold from her eyes as well, which was really cool," he said. "It was like shooting six different shows, there were three or four units, and there was very little crossover with the lab and the Westworld stuff. So we kind of made an effort to get together as much as possible and kind of bond and become friends with as little bit of contact as we had."

Party at Hemsworth's house!

Much of the shooting took place at Melody Ranch, north of Los Angeles near Santa Clarita, where the Hemsworths have a home. It was there, Hemsworth and Wright said, that the cast would come together periodically to bond and share what they knew about the job so far.

"We’d basically spend the whole time asking each other what the hell is going on."

"We’d gather at Luke’s house," Wright said, when asked how the cast members had become such close friends.

"We’d gather at my house!" Hemsworth chimed in, "Which is actually my brother’s house."

Added Wright: "We’d basically spend the whole time asking each other what the hell is going on. … The laboratory was on a sound stage, and you’d walk outside the door and there was the town. On your way to lunch you kind of had to pass through Sweetwater and we’d had very little interaction … it was interesting seeing this stuff that was going on, seeing Thandie [Newton]’s stuff and seeing [Evan Rachel Wood’s]."

Bernard’s moment of truth

When it was time for Wright to learn what he really was, they already had an episode in the can.

"I didn’t know when we shot the pilot," Wright said, "but Jonah assured me, ‘Trust me, there’s gonna be a lot for you to do.’ The way I viewed it after reading that pilot is that Bernard is just kind of the everyman, he’s just kind of going along and flying under the radar; you can trust him."

With one fully "human" performance in the books, it was time for Wright to learn his fate. And by the sound of it, telling him wasn’t easy.

"After the pilot, before we did the second episode, Lisa kind of pulled me aside," Wright said. "And she’s this ridiculously articulate woman, right? And she said 'Jeffery, OK, how um, how um, how do I say this?' And after like 45 seconds of muttering around she said, 'You know, Bernard is kind of a complex character. And he’s actually … a host. And the reason is this."

"The room has many mirrors"

Wright said it was as much a shock for him as it was for viewers, but he understood right away why he had to know at that moment.

"It was important for me because otherwise what I was doing wouldn’t make any sense at all. Because I was in two timelines, and so for Bernard to be interviewing Dolores makes no sense — so it was necessary.

Dolores (Evan Rachel Wood) and Arnold (Jeffrey Wright) in 'Westworld.' Image: hbo

"And also, it changes the performances slightly because of the relationship that Arnold has to Dolores. It’s obviously a paternal one. She’s a proxy for his lost son and all of this stuff, so there’s kind of an initial warmth from that relationship … but it’s cyber-warmth."

Wright repeatedly praised his bosses for constructing a show that, for all its confounding sleight-of-hand, ultimately added up to something.

"The room has many mirrors, many facets, many reflections bouncing off one another," Wright said. "To Jonah and Lisa and the other writers’ credit, that they are able to piece all of these rings together with an almost mathematical precision — it’s really well-considered and pretty clever."