In this game I've been checking out(empire total war) the basic infantry usually only have the first 2 ranks firing and then reloading and firing again while the rest of the ranks just stand around, even if the formation is like 20 ranks deep. Would that have actually been the case in real life?
Another thing is would the infantry have used the tactic of firing and marching forward at the same time or some kind of similar tactic. ?
In the Age of Enlightenment, warfare was about precision. Those men waiting to fire are waiting to fire together, because of the poor accuracy of the weapons.
The musket is a very inaccurate weapon and men fighting on lines would fire in volleys, everyone in their line would fire at once, kneel down, and let the next line fire. The purpose of this was due to the technological limit but also to scare the enemy with a shock from getting hit by the volley.
Second, lines would rarely fight in anything more than three or four lines per battalion. There are issues with the number of men (you want to take the most ground with the most men to have the most men firing the most muskets) and also it make organization difficult if they were too much of a block (they also would make a juicer target for artillery), so you would never see them in more than just a few lines.
Moving and firing is difficult because you can't reload once you're firing, leaving you exposed to enemy fire until you stop to reload (and it isn't feasible to reload on the move despite what Hollywood says).