Time Machine after formatting still works? I would like to format my mac, and be able to access old files, photos... from my previous time machine backup.

I have backed up my mac with time machine and I am uncertain if after formatting I will be able to access my backups. Time machine backed up my previous system, its not like an image right? it's different? Will I still be able to access these files?
You will still be able to access your Time Machine backup -- but there is really no way to be assured that it will work fully and that no files have been corrupted since they were first backed up. If you have enough space, I would recommend making a new backup on its own partition with SuperDuper or Carbon Copy Cloner (the free/trial versions should suffice for a one-time backup), before wiping your mac. Note that if your external hard drive happens to fail before you've copied the stuff back onto your Mac, you will lose all your data, so it would be even better if you could make a second backup to independent media before wiping your Mac.