I listened to a podcast about the punic wars recently. Hannibal was essentially trying to separate Rome from its city state allies. Some if them did eventually come across to Hannibals cause. Presumably they fought with whatever equipment they had to hand. How would the Romans army have known friend from foe in close combat?
Similarly, add in mercenaries and slaves pressed into service with the promise of freedom and you have a lot of ethnic diversity and presumably, a lot of different styles of armor and weaponry
With armies of tens of thousands of men, you're not going to know everyone on 'your side', and it doesn't sound to me like everyone on a side would have been kitted out exactly the same.
So you're in the midst of battle in the Punic Wars. You turn around and theres someone you don't recognise. You have a split second to decide if they are friend or foe. What cues inform your actions?
Here's the problem: If a hostile has got behind you, shit has gone utterly sideways and your reaction should be to panic. Actual combat is not the Hollywood Combat Moshpit of combatants on both sides being intermingled in a giant mass of one-on-one fights. More can be said on this matter if anyone would like to contribute their knowledge; for the meantime, here are some previous posts for your consideration:
Ancient warfare is not as disorganized as you may expect, given how modern media portrays it. If there's someone you don't know or can't identify to the right of you, you're either going to panic or die. Soldiers fought in ordered formations, with only limited exceptions. To answer your other question, however, there were many ways that ancient armies identified eachother -- and you're right, they weren't always reliable!
Let's assume you're a Roman soldier. You probably know the men in your immediate formation: either a maniple of 80 to 120 men at the time of the Second Punic War, or a century of 80 men by the time of Augustus. How would you identify fellow Romans? Aside from distinctive weaponry and armor, shields were often used. According to Vegetius and his De Re Militari[1]:
... every cohort had its shields painted in a manner peculiar to itself. The name of each soldier was also written on his shield, together with the number of the cohort and century to which he belonged.
Additionally, each unit and sub-unit in a formation would have a distinctive insignia. A century would carry it's own banner, while a cohort would have it's own dedicated signifer. A Legion would have it's own unique banner as well; the eagle is the stereotypical one, but before this widespread adoption (and occasionally after), legions would have banners of bulls, oxen, wolves, etc.
How do you identify those outside your legion, however? Well, the answer is: sometimes you can't. Auxiliaries, mercenaries, and tribal allies would try to show their allegiance through various means. Pre-imperial allies might march under Roman banners, for instance. As the Republic waned and the empire came into being, auxiliaries would become an organized part of the Roman military, and be offered signifiers accordingly. Language and heraldry (I use that term loosely, as heraldry as we know it is an invention of the High and Late Middle Ages) could offer clues as to who a particular group was, with Greek city-states having distinct motifs on their shields for instance. But it required plenty of coordination to make sure allied foreign troops weren't attacked. For example, during the siege of Gergovia, Caesar told his Aeudi (Gallic) allies to expose their left shoulders to show allegiance to Caesar. Unfortunately, his legions either didn't notice or the Aeudi failed to properly present themselves, and the Aeudi were attacked [2], showing just how confusing foreign allies could be.
[1] - De Re Militari has it's own issue in terms of historical accuracy, but this part seems largely in-line with what we know about the Roman legions. Patterns, symbols of allegiance, and various animal motifs seem to be standardized across the various levels of organization in the Roman army.
[2] - This story comes from Caesar's Gallic Wars. Unfortunately, there's a debate over whether the Aeudi just... betrayed Caesar (they probably did, after a better offer from his rival Vercingetorix), but I still think this story has value. If it was believable enough that this story actually made Caesar look BETTER than a simple betrayal, it gives us valuable insight into the kinds of issues a military commander at the time expected to face.
So what I'm hearing is that warfare was organised, such that the cues were at least partly, positional (as in 'the enemy are in front of us, so we kill anyone in that direction').
I assume that pincer movements and such (not sure if they actually did these kind of manouvers) where one section of a friendly force may encounter another section of the same force, would require an awareness of both fronts of battle as they vanquished their enemy and met.
Thanks for the insight.
Markus