Testing games

Started by
2 comments, last by Ravuya 18 years, 7 months ago
I've been thinking a lot lately about how to go about testing games while they are in production. Specifically, I am curious about how to test features of a game that are deep within the game. For example, let's say I am developing the original Legend of Zelda game. How does one go about testing, say, dungeon #5 (there being 9 dungeons total) without having to start the game and get to there specifically. Would you typically set some internal variable for debugging purposes that would allow you to warp directly to that level and set the player's inventory directly, etc.? If anyone has any specifics on how you guys handle this in your games, that would be appreciated. Thanks.
Advertisement
Well, that's where cheat codes originated. Productors created them to test features, and to skip levels. Then they left it as "feature" aka cheat codes.

So, make a simple method of inputting (like console command) in the game that allows you to change game state.

Like this:

int Level = 1; //global storage class for which level you're on

check input and access the variable inputted

if(CheatCode == 6) //which cheat code is used
Level = 6;

Something like that
Yeah, you want to put in cheat codes so that you can skip to certain levels. Depending on the size of your game, you might want to look into implementing some kind of cheat menu, or quake-like console system that allows you access various cheats at runtime. It can also be handy for tweaking variables in-game.

Bear in mind though, that testing each level individually like this, isn't necessarily a perfectly reliable test of your game. Some bugs might only appear if you play the game all the way from the beginning, for example.

You should still have cheat codes to aid in reproducing bugs that are part way into your game, just bear in mind that using cheat codes is not a substitute for testing your game thoroughly.

If it were me, I'd use a quake-like console system, and have a command that started a game on a specific level. I'd also have commands to give the character certain items, or set the player ammo.
I have a couple of debugging hooks into the engine that let me warp the player around and do basic item managment.

This topic is closed to new replies.

Advertisement