Firstly, why should you wall in? Well, I do a lot of tech heavy builds. That means fast cycores and skimping on Zealots early on. One thing that really annoys me about sc2 is that
a) you need three (or more) zealots to wall a ramp
b) autosurrounding lings kick zealots asses
Hence, I came to the conclusion that the safest way to tech is by doing a wall in. Thanks to some model improvements, buildings wall off nearly perfectly thus you can create a 1 square gap where all your units can leave, but lings can only file in single file (or at most, 2 at a time). This turns swarms of zerlings into a manageable task without wasting force fields.
Here is an example of the basic wall in:
Yes, that is ling tight!
There is one zealot under that tree and nothing gets in or out unless that zealot moves or dies. Don't beleive me that it works? Well...
Those lings can't get in, and they start to glitch. They can't attack my zealot more than 2 at a time AND my sentry can just pick them off ezpz (and force field the choke if my zealot happens to die while I chrono in another one). You'll be surprised at how hard lings and stuff glitch up against a wall in - it's the first major example of SC2 AI being really really stupid due to its build in autosurround/autotarget on melee units.
How do you wall in? Simple.You can wall in the any combination of Gate-Core-Forge - you just need two buildings!!
Put your pylon at your ramp. I like to place it as shown: with the pylon power just hitting the top of the ramp (less likely to be sniped this way). However, as long as it is close to the ramp the actual position doesn't matter too much.
Place your gateway as shown. It should be ONE square up from the bottom and right on the edge of the ramp. To repeat myself - thats as close to the ramp you can get and one square up from as far bottom as you can go. On other positions, the gateway should go where the zealots will pop on the inside, that could be in this position or in the one about to follow...
Place your cybernetics core here (or 2nd gateway if you are rushing). It should be as close to the ramp as you can and to the left as far as you can go. There is NO space next to this building. It should fit snuggly against your gateway and they should just be side by side.
Viola! That's a ling proof wall right there :D. Place a zealot where the probe is and you are done!
Just knowing how to wall can save your bacon. Against very fast pool rushes, cleverly placed dual gates can stop that rush dead in it's tracks! At the bottom of this post there is a replay where that happens (although I end up losing stupidly). Yes, the Protoss wall in is highly effective against all forms of early zerg aggression (if coupled with a quick immortal!).
There's nothing those lings can do except bug out - I didn't lose anything defending
Wallins don't have to just be for PvZ - they can be expanded to team play as well. The wallin can be a good stall against a mass of melee units (i.e. a pz team and the like). This can be see in this wall on Metalopolis when I went for a Void Ray rush and Kennigit died on me.
Thats a scary army
Successfully stalled for Void Ray and Cannon!
Note: my zealot was actually a little too forward D:
Furthermore, this has applications to PvP as well. With a nice tight wall in you can tech safely and there's nothing they can do about it. Mass zealots simply cannot break through if you have a Sentry and a Stalker or two on the way.
My DT Rush PvP - he counters but can't break the wall
Nope! 2 gate can't get in!
So there you have it people! Wall ins are great at bugging melee AI and they remove the problem of 3 zeal to block a ramp. I really hope more Protoss start to employ this in their game as I beleive it is the best way to tech safely in both PvZ and PvP - you will NEVER die to early game aggression with a wall in and proper scouting!!
Here are some replays of the wall in in action. Now they aren't the best reps, I die to some pretty dumb stuff in some of them. But in all of them, the wall works and that's the point of the replay. It shows that the wall can save you from early game aggression (but not from midgame stupidity!) I don't profess for these opponents to be top tier either - but again, the point remains that the wall in doesn't depend that much on skill to be effective, its a fucking wall after all - it has no feelings, emotions, or sense of skill.
http://www.teamliquid.net/staff/Plexa/SC2_Wallin/Wall2_doh.sc2replay (this is the quick pool game, I move out to attack him with zeals and he counters me doh)
I hope you enjoyed this guide, and I hope it makes for safer teching for every Protoss out there.