As I perch at my laptop and begin to tell you why I found “A Hologram for the King” to be a beautiful and eccentric waking dream about a modern-day Willy Loman played to subtle perfection by America’s most beloved and accomplished leading man, the Rotten Tomatoes website is still awaiting its first review of the film, and here’s what I think about that:

When all is said and written and done, I wouldn’t be surprised if some critics absolutely loathe this movie.

It’s just that kind of film. Strange and ambling and sad and whimsical. Polarizing.

For all its weird and sometimes almost arbitrary touches, “A Hologram for the King” is faithful to the acclaimed (and equally ethereal) novel by the prolific and gifted Dave Eggers. Writer-director Tom Tykwer is clearly a fan of the source material, and he has done an admirable job of taking a melancholy, beautifully rendered piece of prose and catapulting it to visual life.

The great Tom Hanks is in prime form as Alan Clay, a former hotshot salesman of a certain age who has fallen on hard times and is haunted by the memory of once spearheading Schwinn’s move to outsource hundreds and hundreds of jobs to China. Good for the company, terrible for all the lives left ruined.

Divorced, financially strapped, unable to pay for his daughter’s college education and clinging to his last shred of professional dignity, Alan parlays his tenuous connection to the nephew of the king of Saudi Arabia into one last grasp at the brass ring: He’ll be traveling halfway around the world to represent an American tech company bidding to become the IT provider for the king’s long-delayed, wildly ambitious project to build an entire new city in the middle of the desert.

Talk about your classic fish-out-of-water tale.

With Morocco standing in for Saudi Arabia — and special effects magic creating many a tableau consisting of buildings from different locales meshing with CGI imagery — “A Hologram for the King” is teeming with breathtaking long shots of the seemingly endless desert, split in two by a lonesome stretch of highway and dotted with only a handful of buildings and a lot of signage proclaiming this as the site of a whole new world (whenever the king gets around to it).

Not that Alan is situated in the desert. He’s in the middle of the city, in a nice enough hotel — but he’s plagued by jet lag, a nasty cyst growing on his back, and crazy nightmares. Nearly every morning, Alan sleeps through his alarm clock, misses the shuttle out to the site and has to enlist the services of a freelance driver named Yousef (Alexander Black), who is one of those magical helpful driver/assistant/wise native types that often show up to help out the naïve American in films like this. (See “Whiskey Tango Foxtrot.”)

Day after day, the government official who is supposed to act as Alan’s liaison stands him up. As for the king, tomorrow just MIGHT be the day he arrives so Alan’s team can make its pitch. Then again, it might be another month before the king decides to make an appearance.

Sarita Choudhury is a screen-grabbing presence as Zahra, the doctor who treats Alan on more than one occasion for more than one ailment. She’s beautiful and she’s divorced and she’s one of the few female doctors in the country — and she seems to have a thing for Alan, despite the considerable cultural barriers. Maybe things are looking up for Alan, finally. Maybe.

Booze is banned in Saudi Arabia, but there’s an awful lot of partying going on just behind closed doors. Women must adhere to strict rules, yet the good doctor figures out a way to get topless while snorkeling with Alan. Only Muslims are allowed in Mecca in the Hejaz, yet Alan somehow manages to pass and to observe a phenomenon rarely seen by Westerners.

Oh, and Yousef the loyal driver has some relatives with a serious collection of guns. I’ll say no more.

Writer-director Tykwer (“Run Lola Run,” “Cloud Atlas”) skillfully presents a series of fantastical scenes in a way that has us thinking: Sure, that could happen. This is quite simply a beautiful film to behold.

Few actors can match Hanks’ ability to play seemingly ordinary men thrust into extraordinary circumstances. (Of course Hanks is playing Captain Chesley “Sully” Sullenberger in Clint Eastwood’s upcoming film about the pilot who landed a US Airways flight on the Hudson River.) For 30 years, Hanks has been delivering the goods, and he shows no signs of slowing down any time soon, and how grateful we are for that.

★★★1⁄2

Roadside Attractions presents a film written and directed by Tom Tykwer. Running time: 97 minutes. Rated R (for some sexuality/nudity, language and brief drug use). Opens Friday at local theaters.