A Japanese-language epic set in ancient China and based on a manga series, “Kingdom” draws on the best of several traditions. There are touches of Akira Kurosawa’s “The Hidden Fortress” — and perhaps of “Star Wars,” for which George Lucas plundered “Fortress” freely — and also of the wuxia spectacles of King Hu. The film acquits itself honorably, even if its ultimate message is disquieting.

The plot involves two boys who are raised in slavery and train each other to fight, with the goal of becoming great generals. When they grow up, Piao (Ryo Yoshizawa) is taken to serve the king, while Xin (Kento Yamazaki) stays home — until Piao returns, mortally wounded. The king’s brother has moved on the throne, and Piao sends Xin to protect the deposed king, for whom Piao had been serving as a double.

The film takes place in 255 B.C., during the Warring States period that preceded the unification of China. So it is a tale of ambition, factionalism and class rivalry. The king (also played by Yoshizawa) tolerates the propriety-flouting Xin, whom Yamazaki plays as a rogue who is quick to speak and quick with a sword. The director Shinsuke Sato shows an eye for the geometry of action scenes, both in the large-scale battle sequences and in two-man bouts, as when Xin dodges poison darts in a bamboo forest.