Are cheat codes no longer in games because people making games realized that they can charge people for what cheats used to do, or are cheats gone because of achievements?
Uh… neither. First off, nobody sells what cheats used to do. I have no idea where you got that idea, but I can’t think of a single game that sells “god mode”, “no clipping mode”, or “infinite ammo” DLC. Second, cheats aren’t gone because of achievements either. Cheats still exist because the reason for cheats still exist. Cheat codes exist in order for the developers to test their own stuff quickly and efficiently.
Imagine that you’re a gameplay programmer, and you’re working on the combat system. You’ve been tasked with adding support for critical hits to spells - fire spells will need to activate an additional burning damage over time effect after a critical hit, frost spells will freeze the enemy, lightning spells will arc to another nearby enemy, etc. Suppose that you write some initial code, and you think you’re ready to test it. It’s not reasonable to ask that you go through the entire class selection process or leveling up of your character just to get the spells needed to test your code changes. That would take a lot of time. So, instead, you use some cheat codes - a combination of console commands and internal debugging menus to set your character to an appropriate level, grant your character the appropriate spells, and probably add god mode so that you don’t run the risk of accidentally dying to the enemy while you’re testing - in order to set up your test scenario in a matter of seconds, rather than minutes or hours. You do this because you will need to be doing this many times before you are certain your code works.Â
Besides you, all of the other engineers - graphics, gameplay, network, etc. will need to test their stuff. The designers will need to test their stuff. The sound guys need to test their stuff. The artists need to test their stuff. If you multiply the time savings across every developer that needs to make sure their stuff works in the game, you start seeing why cheat codes (or perhaps the actual name - debug commands) become necessary. They exist to debug issues and can save the collective equivalent of months or even years of development time.Â
As for why debug commands aren’t always available in the finished product, it’s primarily because we now have better tools with which to develop games. Rather than building in a secret button combination, we just remotely connect to the development console and input commands from there. We just lock those codes off for the release version, and make it so that achievements won’t fire when debug commands are enabled. PC games almost always have ways to enable the developer console, granting access to the debug commands. Console games don’t because players usually lack the hardware necessary to remotely connect to the game with a PC. That’s really all there is to it.
Got a burning question you want answered?
Short questions: Ask a Game Dev on Twitter
Long questions: Ask a Game Dev on Tumblr
Frequent questions: The FAQ

















