How did armies know who was an enemy vs ally in battle before standardized uniforms?

by terrapin-man

Was there some way to show which side a person was on, or were battles mainly a free for all before uniforms were introduced?

DanKensington

More can always be said on the matter, of course, but as this exact question of combat identification is one of the more common warfare questions on the sub, here's a few previous posts for your perusal: