Many Japanese castles were built or renovated during the Sengoku period.
They usually have a moat to prevent the enemy to infiltrate by tunnels.
There are loopholes for guns and arrows (Himeji castle has more than 1000 loopholes).
They have a main gate used to trick the enemy. There are usually traps around the main gate.
Sometimes the number of floors are tricky (Matsuyama castle has 6 floors but looks like 5 from the outside).
There are hidden corridors, and confusing mazes that make it difficult to locate the commanding room such as the UNESCO world heritage site Himeji Castle.
Nijo Castle in Kyoto has nightingale floors that squeak to make sure the ninjas cannot raid in the middle of the night while people are sleeping.
Kumomoto castle has many fruit trees inside so that people can feed themselves by the fruits during a siege.
Azuchi castle was built on the top of a steep hill with a separate tower inside so that the residents could see the approaching groups from dozens of kilometers away.
Each castle had an official drum (taiko) beater samurai to tell the time.
It takes years to build a castle but according to a story Hideyoshi Toyotomi built the Sunomata castle overnight by using pre fabric walls.