When you make a base, the most crucial thing is compartments. You have to separate your buildings into compartments so that the attachers have to break through multiple compartments to reach your main core. For every 15 tiles, there should be at least one compartment. Compartments should be no bigger than 4 buildings (some exceptions). Try to keep compartments closely packed.
Don’t be like these guys
Bad defense placements
Defense placements are very important as well. The Clan Castle, X-Bows and Inferno Towers are generally considered to be the most important defenses, thus put in the core of the base. Then comes the splash defenses, such as the mortar and wizard tower. Then the Teslas, then the Air Defenses and then Archer Tower and Cannons. This is also generally the order that you upgrade them in. If you have 3 Mortars, try and beep them in a triangle for balanced defense; If you have two wizard towers, then beep it in a line. If you have 6 archer towers, beep it in a hexagonal shape. And so on. (Tip: Do not upgrade your Town Hall from TH8 until you have maxed all defenses and most buildings)
Storage placements are quite important. Generally storages should be spread out and not in one compartment or one area (applies for collectors and mines and defenses as well). Dark Elixir Storage is often the most protected storage as it is the most valuable resource. Then comes Gold and then comes Elixir. As with the defenses, If you have 3 Storages, it should be kept in a triangular formation.
Funneling and traps are not necessary, but very valuable. 2 Giant Bombs can save you from a Giant-Healer army, saving you lots of resources. Those Giants Bombs could also defend you from Hogs Riders, stop a 3-star lose. Traps should be put in areas where there are lots of attacks, or where you expect there will be. Giant Bombs are good against Goblins rushing to the storages as well, so put them next to the storages; Spring Traps are good for Giants and Hog Riders so put them next to defenses. Play around, experiment; that’s a part of the game. Funneling is a way to get the attacker’s troops to step on a trap. They’re usually holes in compartments, with the hole filled with a trap. Once again, experiment with it; make a labyrinth base filled with funneling!
Without Walls, what would you do? The game wouldn’t be interesting at all! The majority of your walls should be used to make compartments, but about a fifth of your walls can be used for funneling (unless you’re malting a labyrinth base, which by the way I don’t recommend as it is very hard to do properly) and other purposes, such as wall cushioning. I’ll talk about that later.
The main things you want to protect are defenses, resources and sometimes Town Hall depending on your play-style. You don’t ever really want to protect other buildings, such as barracks, Collectors and Mines or Army Camps. Heroes can sometimes be useful, so they can be inside the walls. You only want to protect Collectors and Mines and Dark Elixir Drills If you have extra walls. And when I say extra walls, I mean it. If you’ve got lots of compartments that are all with 4 buildings, consider using those walls and separating the compartments for more compartments so it’s harder to break in. So yes, (almost) never protect buildings other than defensive buildings, Storages and TH.