I've been trying to make various sorts of games throughout the past few months, I've had several false starts (currently using python + pygame). I find that what happens is that I get a first pass of the basic mechanics working, and then I find it impossible to proceed because the internal organization of the game does not scale up well. What typically happens is that after I get a working prototype, the complexity of the code is at a manageable level. Then I add a new feature, and the complexity increases, and another feature, which leads to more complexity. Soon enough, the complexity is unmanageable - there are so many special cases that it becomes impossible to account for all of them.
How should I deal with this kind of problem? Is there some kind of technique of abstraction that I am not applying? Do you know of any resources or guides that might be useful here? Or am I just bad for not being able to deal with a little complexity?