I think on Malta they were alredy making extensive use of gunpowder on both sides. If a wall was breached, pikes would be very effective in keeping any attackers from rushing in, but I think most of the fighting was done with guns.