Good morning James,
Not sure what "not perfect credit means." If your credit score (using FICO scoring) is less than 640 then it is unlikely you could be approved for mortgage financing at this time. Get a referral to a Local Mortgage Banker so you can be thoroughly prequalified.
IF your credit score is less than 640, here are some tips to prepare to become a homeowner in the future:
First, settle any outstanding debt. If you owe money on collection accounts, charge-offs and/or judgments, make payment arrangements and get these accounts paid promptly.
Next, begin rebuilding your credit. If you have current accounts with good payment histories, or even some previous late-payment-blemishes, make sure you continue to pay those accounts on time. If you do not have any existing credit accounts then you'll need to establish several in order to create a viable credit history.
I have found that CONSUMER ACTION is an excellent resource for objective advice on all things credit related. You'll find free and sincere advice on everything from settling collection accounts to rebuilding credit to building credit from scratch on their website. http://consumer-action.org/
Beware of anyone offering to "repair" your credit! The Federal Trade Commission issued a stern warning last year that such offers are scams. Find more from the FTC HERE. http://www.ftc.gov/bcp/edu/pubs/consumer/credit/cre13.shtm
The best way to buy a home is to have a decent credit history combined with sufficient Income and Assets for a home purchase.
The best way to have a decent credit history is to settle negative outstanding obligations and pay all your bills on time for at least two years.