Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Console Commands, Cheats, and Debugging - Kevin Dougherty

Without a doubt, debugging is important in your games, but how should you go about it efficiently? Having a debug tool for every step and every line of code bogs down not only the code base, but also your engine, and your output log. So here are a few tips I've found to get started:

Have basic commands - What this means is actually up to you. But it's commands that influence the basic, core elements of the software you're working on. This could be health increasing and decreasing for an rpg type game, free cam for a level, killing all enemies, showing colliders, anything that could hinder basic progression. Anything else is up to you, but the best type of commands are usually the most common.

Don't plan ahead - while this may seem counterintuitive, unless you *know* something isn't going to work, don't plan for it. Only add debugs to the console if you can't parse through your logic the old fashioned way. Debugging is always helpful for this, and most debugger tools should be taken out before release. It's best to be reactive with this, just to minimize time spent doing stuff that doesn't matter.

Be specific - Don't have error codes that are just numbers, and if you do, put the meaning behind them somewhere public. There might be a bug in release, and it'll help if whoever found it can report it. And when working in a group especially describe exactly what error just happened. Makes it much easier for them to solve and plan around it.

Have fun - Not all cheat codes are cheats, and not all of them are for developers. Have fun with them. Big heads, hats, confetti explosions, turning them all british with scones and tea, stuff like that will not only make your game fun, but also make it fun to test.

There are a lot of ways to do debugging, but it should never be more complicated than it needs to be. Especially if the engine you're working in has built in commands already. Chances are, you can add more to the console, and then you're really cookin with Wesson.


Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.