One of the nifty things about a spear, at least in real life, is that you can use it defensively, to hold an opponent at bay, keeping it at a distance greater than the reach of its attack. I've been mulling ways that this could be modeled in basic D&D combat, and I think I've come up with something that might work.
In order to hold an attacker at bay, the defender must be wielding a pointed weapon with a longer reach than the attacker's weapon (or natural attack form.) A spear or pike is the obvious choice, but a long or two-handed sword might also work, at the referee's discretion. Hold at bay must be declared at the beginning of the round, when intentions are announced. Instead of making a normal attack, the defender holds the weapon outstretched with the point trained on the (potential) attacker(s), ready to thrust it sharply if the potential attack becomes an actual attack.
If the opponent he is holding at bay chooses not to attack and does not turn its back, the defender does not get to attack either - the round ends in a stalemate. If the opponent does choose to attack the defender, the defender strikes first, regardless of initiative, and gains a +2 bonus to hit. If a hit is scored, the strike causes normal damage, and the opponent must make a saving throw vs. death ray with a penalty equal to the damage rolled, or be held off and unable to complete its own attack that round. On a successful save, the attacker has broken through the defense, and may attack in return. Unless the defender is able to once again put some distance between himself and the attacker, he may no longer attempt to hold it at bay.
Optional: If the saving throw fails on a natural 1, the attacker has impaled itself upon the defender's weapon, for double damage, and if the weapon has a barbed or flanged head it remains embedded until pulled free, causing another die of damage. On a natural 20, the attacker breaks through the defense and breaks the weapon as well.
Multiple attackers: A defender can defend in front of himself only, and may make a defensive strike against only whichever attacker chooses to move against him first. All attacks against him after the first are resolved normally. An attack against the defender from behind is at an additional +2 to hit, and instantly disrupts his attempts to hold other opponents at bay. Thus, surrounding or flanking the defender effectively nullifies a hold at bay maneuver. Nonetheless, using hold at bay against multiple opponents is a valid tactic when defending in a location that does not allow opponents to surround, such as a dungeon corridor or with one's back against a wall or corner of a room. While it's certain that attackers after the first one of the round will break through the defense, none wants to be that first one, and thus all might choose to hang back out of their individual desires for self-preservation.
Multiple defenders: More than one defender may add a spear to a hold at bay type defense, if all are in a position to strike the front of the opponent as it attacks. For example, three fighters with spears might form a line to defend against a boar. In this case, each defender gets to make a defensive strike, with the usual +2 bonus, and damage from all that hit is added together to determine the penalty to the attacker's saving throw.
Multiple attackers and defenders: A group of defenders in a tight formation may hold off an encircling group of attackers. When a member of the surrounding group decides to attack, any and all defenders facing in that direction may take their defensive strikes against it. Note that even if an attacker breaks through this defense, it does not automatically nullify the entire defense, but only that of the defender it attacks, and any who choose to attack it in normal melee in the next round.