The pentium g3258 is great if you only play games like vanilla skyrim, heavily single threaded. It's just in every other game, like heavily modded skyrim, mmorpg's, multi-player versions etc, that the pentium's dual core really kills performance. For those games the i3-4170 with HT will really pull it's weight, not quite as good as an i5 true quad, but close. The i3 may not have the clock speeds of the g3258(oc) but it's definitely more versatile.
For amd, the fx6300(oc) is the budget cpu of choice, having no core count hangups, good thermal properties and very good OC ability. The only drawback to amd fx Cpus is their relative weakness in single thread performance vrs similar Intel clocks. While OC is more of a hobby for Intel cpu's, for fx it's almost a requirement. This may or may not change much with dx12, but for right now, stock fx Cpus are lagging.
So, i3-4170 or fx 6300, either is good for a tight budget build.