If you can't figure out how to beat a level, here's something to try.
Since almost all attacks come down from above rather than from the sides, roof blocks are far more valuable than wall blocks. However, you can't stack a roof nearly as high as you can stack a wall. So here's what you can do. Find a spot with uneven ground, start your king a little bit above the ground, then build a wall where your king will slide underneath it. That's how I managed to beat the final level.