which cpu is good for gaming

Solution
They both perform well but the Intel is more power efficient, quieter, cooler and performs more instructions per clock. I would choose the i5.

The platform (motherboards) for the i5 are newer and have more modern features too.
They both perform well but the Intel is more power efficient, quieter, cooler and performs more instructions per clock. I would choose the i5.

The platform (motherboards) for the i5 are newer and have more modern features too.
 
Solution
I would go for the i5, because the i5 has a TDP of 84 Watts, while the FX-8320 has a TDP of 125 Watts and it has a Newer manufacturing process (22nms) while the FX-8320 has 32 NMS.

The FX-8320 Is better in Overclocking and it has more cores.