Shovel Knight: Debug Features

July 27, 2020
protect

Good day, programming pioneers! If you've ever looked into the world of game development, you've probably heard that making games is really tough! While that might be true, as we develop more games, we are also developing new ways to make them easier to build. Today, we'd like to discuss some of the development tools and tricks that speed our games from concept to reality. If you're making a game, we recommend you consider supporting any version of the features we're about to discuss. Most of them only take a day or two to implement and the payoff can be years worth of work saved!

 Debug Features

 

By implementing powerful debugging features into our games, we've sped up our iteration time considerably! “Debugging” typically refers to the act of finding bugs. In this case, we’re using it to describe features we make available in the developer version of the game. Creating these developer-only tools helps us save time, and in turn lets us build a stronger, more exciting experience.

Let’s dive into debug tools we’ve used on Shovel Knight: Treasure Trove. 

 

Dev Menu

 

 

 

Normally, when a player boots up Shovel Knight, they’ll see the Yacht Club Games logo and a title screen. However, when you load up a developer build, you see the screen above! The Shovel Knight Dev Menu is a separate state that lets you load into the gameplay. You can boot into the stage you’d like to play, set your character, set up multiplayer options, switch your save slot, and much more! At any point in the game, you can quit out and return to this menu. The Dev Menu gives you a lot of flexibility to jump to various points of the game and iterate quickly!

 

  

 

 

We’re serious about reducing the time it takes to test the game. We even gave the Dev Menu a search option because taking the time to click through all of the stages was too much!

 

In the gif above, all of the options being set are saved and displayed in the top right corner. You can "pin" a particular stage, allowing you to immediately boot straight into that level with certain settings. For example, if a programmer is testing multiplayer battles against Plague Knight and Polar Knight in the Lost City, they don't need to setup a special case in code to allow their team to iterate on their gameplay. It's all tuneable through the handy Dev Menu!


In addition, things like the build (revision) number and date are displayed so you know exactly what you’re playing. An enormous amount of confusion can arise when you're trying to fix a bug in the wrong version of the game.


 Console

 

 

 

Consoles are simple but effective tools for allowing quick access to more debug features- maybe that's why they've been in games since forever! Even though we try to bind every possible command to be a quick press on a keyboard or controller action, sometimes complicated actions are too difficult to map. This is why we have a console! It allows us to have hundreds of commands including setting specific save data, spawning enemies, and creating helpful debug visuals. We need to make sure to document all of these console commands thoroughly, lest we forget.


In the example above, you can see that we draw all the collision points Shovel Knight interacts with, as well as his attack and defense boxes on screen. This allows us to clearly see why (and where) Shovel Knight or an enemy would take damage. The ‘boss’ command sends Shovel Knight directly to King Knight himself!


We also make sure that these elaborate console actions  (that take many parameters or get annoying to type) can be saved to custom keyboard bindings. We provide an action for anyone on the team to customize their game and readily make use of it, just in case it takes work to set up.


 

 

Flycheat  

 

Flycheat is easily the most-used debug feature in our arsenal. If you're making a game and don't have a quick way to effortlessly move your player character around your maps, take a look at this:

 

  

 

As you can see, we can press a button to make Shovel Knight fly through the stage at a rapid speed (or very slowly if that's needed.) We can make him skip rooms, jump to specific checkpoints, fly through walls, and avoid damage. Furthermore, we can throw in a lot of debug features on the controller when you're flying, since you could never be in this state in normal gameplay. In flycheat, you can add or subtract health/magic/money, apply upgrades, kill enemies, snap a second player to your position, and much more!

 

QA Display

 

  

 

We create displays strictly for debugging the game (in the traditional sense), too! These can be handy even if you aren’t debugging the game. In the example above, you can see a display in the upper right-hand corner that shows what buttons are being pressed on the controller. You can also view the player’s position, stage, and room number. This makes it very easy to report an issue and track down its source without having to memorize every addition to the game.

 

  

 

These displays can get quite complex, as you can see above in our AI brain logic display. Understanding and being able to toggle information about why the game is performing a certain way helps us quickly figure out how to make it better.

 

Free Roam Camera 

 

 

 

When you’re making a game, things can get kind of weird! Occasionally, objects and characters can wander off, or their depth may not be very clear. We created a way to manipulate the camera as needed so you can figure out how certain elements interact. For example, did you know the charflounders at the end of the gif are actually always there and only jump into view once the player gets close? Well, now you know!

 

Framestep / Framerate Control 

 

  

 

It can be challenging to make sure every little thing is frame-perfect when you have to watch at 60 frames per second. So, we have specific keys dedicated to stepping through the game frame-by-frame. 

 

  

 

We also have the ability to speed up or slow down the game at any time. This allows us to tweak auto-scroll durations and makes repeating actions much easier (since you can do so at a slower speed).

 

Input Replay 

 

  

 

What you see above is an input replay of a King Knight stage- essentially a recording of all the inputs. When you play a developer build of Shovel Knight, every input you press is recorded and saved locally. This can then be booted up and played back, recreating the experience. You can jump to different places in the recording, speed it up, slow it down, or take over input control midway through the recording. This makes finding rare bugs much simpler- you only need to reproduce the issue once! Anyone on the team can directly send a recording of their control input to QA so they can experience first hand what’s happening when they play it back. Sometimes, debug features can turn into fun gameplay- d id you know the Streetpass Arena game on the 3DS was created using our input replay system?

 

Live Rebuilding / Reloading

 

 

Much like you might see in a friendly level-building game like Mario Maker, Shovel Knight has the ability to update its levels/art/animation/etc. on the fly. This tool allows you to make a change to the game and not have to rebuild everything to see the results.

 

 

  

Not only is reloading game assets critical, but it’s just as important to be able to reload the state of the area you’re in. In order to test this rapidly, we dedicate a button press to refreshing the stage like it’s the first time you’re there. Then, you can test the various interactions with an object repeatedly and hassle-free.

 

Console Support 

 

 

 

Above, you can see the bottom screen of the 3DS/Wii U versions running on a PC. Whenever we have a console-specific feature, we create a PC equivalent when possible. This way, everyone on the development team doesn't need to have every console on their desk. We can all iterate much faster by using a PC! 

 

Player Statistics

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Read More>>