I know that at least in Western Europe, the various dynasties that held the title of Holy Roman Emperor claimed descent from Charlemagne. In France, the Capetians were the first to call themselves Kings of France and when the direct male line died out, the Bourbon and Valois dynasties were cadet branches that took the throne as a result. Even well past the middle ages, there were numerous succession wars that dealt with the concept of legitimacy and blood to vacant kingship titles (The Hundred Years War and the War of Spanish Succession are probably some of the most well known ones).
I don't know the history of the Ancient World as well but it seems to me that blood and family were not nearly as strong sources of legitimacy. While I understand that clans were powerful forces, I understand that many Roman emperors did not produce hereditary sons and instead designated or "adopted" somebody as their successor. Dynasties when they did exist, seem a lot more short lived and prone to decades of military coups and military leaders rather than having any coherent dynastic line that existed throughout the span of the empire. It seemed like having control of the army was a more legitimate source of power than any claim to blood or membership in a family.
Can somebody explain why the concept of dynastic legitmacy seemed so different between the two eras?