I wonder why, the army didnt use spikes and or made of wood walls, i cant remember the name, but they were commonly used as a weak shield, just to hide, reload, be safe of arrows and peak to shoot again
There are at least 3 types of fortifications you're talking about.
The spikes could be either the
abatis or the
chevaux de frise. The abatis are merely whole wooden logs lined up pointing towards the enemy, meant to disrupt movement in formation, the chevaux is composed of one central shaft to which other pieces of wood, fashioned in St.Andrew crosses and sharpened at both ends, are attached.
Wooden shielding has been used in many cultures during the medieval period.
Of these 3, only the chevaux is easily portable and deployable as is (japanese variant of the wooden shield is also very short and stackable), keep in mind that it doesn't seem like the imperial army had any time to dig in.
To add to that, the wooden shielding had fallen out of use. While it seems a good idea at first, keep in mind that the true strength of musket armed line infantry lies in their disciplined and concentrated volleys. Breaking them up to have them take cover individually is how you get them ran down by cavalry. You'd have to dig trenches, but obviously that takes time.
Facing an army of cavalry was a dangerous prospect up until the infantry firepower revolution at the end of the XIX century, when bolt action guns had dramatically increased the rate of fire of infantry to the point of seriously limiting cavalry effectiveness.
At the Battle of the Pyramids, Napoleon deployed his infantry in Brigade-sized squares, where French troops prevailed on the massed Mamluk army of cavalrymen, but that requires a serious advantage in discipline and standardized training. Warhorses are inherently scary creatures, most cavalry charges worked by simply having the first lines flinch at the sheer size of the thing bearing down on them (which is why you see the prevalence of professional pikemen armies right as armored knights had reached their peak in terms of sheer intimidating armoring).