How to learn to code AAA first person shooter gun?

weapon system like recoil, reloading n etc. I read somewhere that shootergame is a bad example.