For a VA loan, you need a credit score of over 640. I have been told that if you are looking for an FHA or VA loan, you need 3 years since the court date of the foreclosure. 2 years is often enough time from a short sale, but you need at least 3 for a foreclosure. VA is no money down. Conventional loans could be 5-7 years until you can purchase after foreclosure.
My advice is to talk to a lender and map out a plan to purchase, if not now, for next year.