Just buy Half Life 2, it comes with Source SDK... if you got MS Visual Studio .Net 2003 (like me), or one of the other Studios that the Kit supports, it let's you modify just about anything in the game. Much easier than writing your own engine and if you do want start your own engine its a good example on how to set it out.