I prefer you choose an i5. It does a very good job in gaming, and most other stuffs. I recommend you getting an i5-4670K. it is really better performing than you think it would for the money.
Here is the comparison of Both CPUshttp://cpuboss.com/cpus/Intel-Core-i5-4670K-vs-AMD-FX-8350
i5 is a bit costlier than FX-8350, but you will get a good cpu experience with it.
As i5-4670K is unlocked, you can overclock it and get the best out of the cpu. Infact 8350 is also unlocked, but the power consumption and overall performance of i5, makes it a better choice.
If you don't want to spend that much the i5-4570, i5-4670 are also alternatives, that you can get. These two processors are not unlocked, so you wont be able to overclock like the i5-4670K.
But other things will be little similar with lower clock speeds,etc.