Here we are. $508 before rebates, I apologize for the slight going-over, but this computer will play any modern game at 60fps on at least medium settings for a few years to come.
http://pcpartpicker.com/user/Blaze17145/saved/4ETlThe FX-6300 is a fantastic processor that will hold up to almost any game. The 750 ti is a wonderful lower-power dedicated GPU that beats both the XB1 and PS4 in power. It's all powered by a Corsair CX430M, one of the best low-watt power supplies on the market. We have 4GB of Kingston Blu 1600MHZ ram, which can be a slight bottleneck, but only if you have multiple games open at once or dozens of internet tabs. You can double that to 8GB for another $35 and have lots of headroom. The case and motherboard are Micro-ATX form factor meaning they are quite small but do not limit the CPU or GPU in any way. I added an optical drive because you implied you needed one, even though they're being fazed out, luckily they're quite cheap.
The last part is a Windows 8 Key from
http://reddit.com/r/softwareswap. This can save you about $80. People at /r/softwareswap are a part of the Microsoft Developers Network and get free windows 8 keys. They sell them for about $10. In order to use it you simply have to
install windows 8 on a USB flash drive and input the key you've bought when it asks for it. The people there are very nice and trustworthy and transactions are very fast through paypal.
Ask me if you need help for anything else.
Edit: If you're going down to $400 you're not going to be able to game well at all. I'll see what I can do though.