Yes, but they were POLYGONAL forts, not the classic castle. And yes, a Palace is not a fortification.
So while you may attribute the pike and other factors removing the knights, gun and gun warfare did change a lot of things, especially the invention of the actual canon. There are...