@Ergosome,
Ergosome wrote:
It makes sense, but it would read better like this:
"I couldn't recognize him at first but then, as he started walking toward me, I realized it was him."
You have inserted a couple of commas, which I agree with, but you have struck off the final 's' of 'towards'. 'Toward' and 'towards' are interchangeable in both American and British English, however 'toward' is more common in American English, and 'towards' is more common in British English.