I need help identifying a film about a dystopian city ruled by a dysfunctional royal family set in an alternate universe.
I saw it on TV when I was young (sometime in the last 20 years), but I cannot for the life of me remember the title or any of the actors. I've searched for it on and off for many years and I'm hoping someone will know what I'm talking about.
Here are the plot points I can remember:
The protagonist is the prince of a royal family and the story begins with his birth. At roughly the same time, the antagonist of the story is also born. He is not royalty... I believe he may be a peasant.
There are many silly rituals that the royal family is more-or-less required (really, wants) to participate in, much to the annoyance of the young prince who doesn't understand the meaning or purpose of them. All of the rituals are written down in volumes of books housed in a library and there is a small team of librarians who sole job is to ensure that all of the royal family observe the correct ritual at the appointed time in the appointed manner.
The antagonist grows up watching these rituals and believes that they must have some purpose and becomes obsessed with the royal family. So much so, that he sets fire to the library so that he can save members of the royal family and ingratiate himself to them. This succeeds to a point, but the loss of the library drives the king insane (due to the loss of all that knowledge). The antagonist quickly becomes disenchanted with the royal family when he realizes they are completely ordinary people, and none of the rituals had any real significance at all.
Even so, the antagonist, over the years, becomes head of the library (the books that were not burnt) and deeply involved in every facet of the royal family's life.
I remember that the royal family and inhabitants never left the walls of their city and beyond the walls was a vast and untamed wilderness. The prince, as a young boy, found a hole in the wall and would secretly venture out on his own. This was a major point of the movie.
I also remember something about killer owls that lived on top of one of the city's towers. The king, completely mad at this point, commits suicide by opening a door and allowing the owls to come in and kill him.
The queen was obsessed with her cats and banished a trusted and loyal servant for kicking one of them in anger. At some point the prince visited the butler(?) outside the city.
The antagonist slowly drove the family apart. I'm not sure what his ultimate goal was, but I remember a set of identical twin aunts who the antagonist tricked into believing that there was a terrible outbreak of disease. He brought them food, but they didn't trust him and tried to kill him so he locked them in a room and they starved to death. (I think the prince, years later, discovered their bones.)
At the end of the film, the prince and the antagonist (now known as a villain) fight it out, but the prince mentions something about envying the antagonist's freedom from the restrictive rules and customs, and that he should really be considered the hero (or something like that).
The prince wins, at which point the queen relinquishes authority to the prince, now king. One of the king's first acts is to leave the city walls to survey the kingdom outside. At which point the movie ends.
I also remember a particularly intense scene were the prince sees a naked, mud caked girl outside the city walls (perhaps his sister? that point was unclear) who was struck and killed (maybe vaporized?) by a bolt of lightning. I can't remember how that factored into the rest of the movie.
If any of this sounds familiar (I might not have all the details right), please tell me the name of this movie. It's been driving me nuts for over a decade now.