We'll be discussing the different watch panels individually as we go through this tutorial. A watch is simply a panel that "watches" something, whether it be an instance, a single variable, a buffer or even the surfaces and textures in use. Watches - This section of the Output Dock is dedicated to the different watches for the Debugger.Note that you can open multiple different resources and they will all be added to the Code View workspace as tabs along the top, and you can also add and remove breakpoints here (we'll discuss breakpoints further on in this tutorial). By default this starts empty, but you can double click on any resource from the Resource View to open it here. Code View - The code view is where we can see and review different scripts or event code from our project as it runs.We'll go into what the buttons do in more detail further on in the tutorial. Tool Bar - The toolbar has the debugger controls along with some basic information such as memory use, the current (real) FPS for the game and an indicator to show whether the debugger is currently connected or not (the indicator will be green when connected to a running instance of your project and red otherwise.The debugger will need to have been Paused before any information will be shown here. Call Stack - This window will display the current call stack of events, as well as the line number for the code being stepped through.You can then double click on any of the resources to open the code for it in the Code View window. This section works much like the Resource Tree and you can click on the "expand" button to expand the items in it to show more information, for example, the different events for a specific object. Resource View - The Resource View shows you a list of all the resources being used in the project that can contain code or DnD™ actions.Note that if you use the functions show_debug_message() or debug_event() then these will also be shown in the Graph view. Graph View - The Graph View shows a nice graphic representation of the current and average memory use as well as the current and average FPS over time, and you can zoom in or out using the / along with the mouse wheel, and if you position the mouse cursor over any of the graph elements, it will show you the value for that element at the selected point.Here's a brief run-down of each of those items that have been labelled: Below you can see an image of the default debugger view with the relevant parts labelled: When you first run a project in debug mode, the GameMaker Studio 2 workspace will change to the Debugger Workspace which adds various tabs to the different docks, with the workspace empty in the middle to start with. Do this now by clicking the Debug button at the top of the IDE, then continue to the next section of the tutorial.īefore we go into any depth about the various different debugger features, let's first get familiar with the tools available and where they are within the GameMaker Studio 2 UI by default. Once you've tested that it runs and everything is okay, you can then run the project again, but this time using the Debugger. This tutorial uses the YoYo Games Dungeon demo project and should be fine to run for all licence types, and you should be able to press the Play button in the IDE and test the project normally. Debugging is an essential part of creating any project, particularly large ones, and can be used to step through your code a line at a time as it runs, change variable values to see what effect it has, find errors and even optimise how the final project will run. This is a tool that is used for "debugging" your game, which simply means running your game within a special framework where the inner workings of the project are exposed for you to check and, in some cases, change. In this tutorial we are going to show you how to use the built in Debugger.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |