Construct 2 Debugger
Sometimes things do not work like they should. This activity introduces one tool to see some of what is happening behind the scenes when a game is running.
Turn In: Screenshot showing the Construct 2 debugger in action.
The debugger is a tool that shows the game in the top part of the screen and information about what the computer is doing in the bottom part of the screen. In some cases that information in the bottom of the screen is helpful and in other cases it may not provide the information you are looking for.
To understand what the debugger is doing, we will start it up and look through some things.
Open a project in Construct 2 that has some good game play. Instead of the normal Run layout button, click on the Debug layout button (has a bug on it).
Note: The free version of Construct 2 has more limited debug options than the pay version of Construct 2. The information below refers to the free version.
When your game comes up notice the bottom half of the screen. As you play your game, watch some of the values change. We will look at a few of those.
* In the upper right portion of the Debug information are several buttons. Click on Pause button to Pause the game (the button changes to Resume). Click on Resume to start game play. Click Pause to stop the game then click on the Step button to move the game forward. Continue clicking the Step button to "step" or advance the game one tick at a time. The Restart button will start the game over and the arrow button will pop the game out to its own window. When out, click on the arrow again to return the window back to its original location.
* The middle of the debug screen shows Performance information about the system. The "Frames per second" shows how many times the screen can be redrawn each second. The Estimated CPU utilization shows the estimate of how much of the computer's processor is being used by the game. When you have a high CPU percentage and a frames per second significantly lower than 60 frames per second, then your game is not performing very well on that computer. You can make adjustments to the game to try and get it to perform better.
* To the right of the Performance informaton (or below it) are displays that show you information about the system, the current layout, and each of the layers in your game.
* The far left side shows the game objects. You can click on the object to show the number of instances of that object then select one of the instances. When you do, that instance will be marked on the game and the displays to the right of the object will change to show specific information about that object. To the lower right of that displayed information is destroy button that lets you destroy that instance of the object.
While playing your game try the various buttons, try to understand what the displays are telling you, select an instance of an object, and destroy an instance of an object.
While running the Debugger, take a screenshot of the bottom part of the screen the debugger information. Save your screenshot and submit it.
Copyright © 2021 Eric Schumm. Permission granted to freely use this in your classroom.