I once had a go (with
The Sealed Knot, due to going with a friend to see his Knot-involved girlfriend) as a civil war[1] pikeman. Very good in defence, if you can ignore muskets going off above your head and avoid getting burnt by the flaming wadding, and horses won't get near you. With a
little training they can attack well (we didn't, as we were sent to attack a bush, got
the wrong bush and apparently also lost the combat.
), although pikes vs pikes gets a bit messy. When manoeuvring (and bearing in mind that power-lines weren't an issue, back then, but are a hazard to avoid these days) you're generally Ok going in straight lines, even through hedges, turning can be awkward and you'd need to put your more experienced pikes at the edges of a line to avoid flanking. When running away, best off to drop your pike and forget about it.
Spears, on the other hand, I know from elsewhere, are much more handleable and largely meant to be thrown, but means you really need multiple spears and they tend to run out. They're much less ranged and easy to carry
en-mass than either bow or crossbow ammo, and lower range, so once those technologies come into play you're not going to (IRL) stick with spears so much. In fact, ranged attacks are good against pikes as well, obviously, so when it comes to fielding against such a projectile-based enemy you'd probably avoid fielding either pikes
or spears directly against those other unit types.
[1] English Civil War, of course, for those who hadn't worked that out.