I built some houses for a village with elegant pitched roofs made out of half-slabs. The villagers I put there (with eggs) refused to stay, and moved elsewhere pretty quickly. Is this due to the roofs, or is there some other factor?
The roof shouldn't affect it. Look at the blocks in a 5-meter square around the door. If the light levels are equal, it won't register as a house. Also, make sure you're using a wood door, iron doors don't register as valid.