Today, we are proud to introduce the new Inspector - an improved, modularised and more-customisable iteration of our visual tool, to better help you debug, optimise and understand your game world.
The Inspector is our web-based UI that gives you a real-time, bird’s-eye view of your game world. It is particularly useful for understanding what’s happening in the game world and drilling down to a particular entity and its component data. From working with our customers, we know you use the Inspector in a wide variety of ways. With the new version of the Inspector, we’ve taken that variety of functions on board and made it more flexible, so you can create custom workflows to accommodate your different use-cases.
The new Inspector is a convenient way to understand, debug and optimise your game through a simple visualisation of your game world. In the video above, we’re debugging the AI of some wizard NPCs by looking at the selected entities' immediate environments and checking the current state machine against the surrounding environment.
As shown in the video, by having a global view of all wizard entities, the new Inspector helps you to understand the game world from a macro level. You can further set up views to follow specific entities, in this case, our wizard NPCs, and observe them in their surrounding environments. This way, you can check if the game is working as intended, how cohorts of entities are moving or changing, or if an entity is stuck in a bad state. These observations will help you make design changes and iterate the game quickly.
You can further examine entities you’re interested in by looking into their components in real time. For example, in the video, you can check selected the component values of wizard entities by listing them in tabular format and observe the state changes, such as when they start to attack each other and/or get set on fire. This can be used to debug for any unexpected behaviour (e.g. the AI state machine being in the “attack” state without attacking) by sense-checking its components in real time. This visualized approach gives you an easier and quicker option to debug and capture the problem, rather than having to manually add log lines and running through debugging points in a running instance.
Additionally, you can visualise how entities are distributed and moving in your world to make sure the world doesn’t become too dense for your server design. Along the same lines, you can tune the checkout distances of entities to make sure you’re not overloading bandwidth or rendering for your game clients.
We based the design of the new Inspector on our new Runtime paradigm. We’ve designed it to be modular and query-based, to increase your flexibility when visualising your game world.
Starting with the four core modules (Viewport, Query editor, Entity table, and Entity details), you can customise your workspace and connect multiple modules together based on your use case.
For example, to analyse a playtest in real time, you could set up the workspace to show all your players in one viewport, and then automatically follow the selected players around with information about their surrounding environment in a more detailed viewport.
Based on the new Runtime paradigm, the new Inspector introduces the concept of queries and constraints, which is similar to how query-based interest works. Via the query editor module, you can define and restrict what entity data you want to stream from your deployment.
You can restrict your query to only show entities with certain characteristics. For example, by constraining the query to only return entities with the PlayerController component, you will show all the entities that are players in your world. Or, you can filter what you see by specifying an area (e.g. a box or cylinder shape of a certain size) around an entity. Additionally, you can mix and match different constraints to further restrict your query.
With the ‘Entity table’ module, you can select and visualise the component data of many entities simultaneously in a sortable, tabular format. And with the ‘Entity details’ module, you can drill down deeper by focusing on a specific entity’s component values. For example, you could debug a misbehaving NPC by inspecting any null references or NaNs in its component values.
The new Inspector is our out-of-box modular tool that helps you examine your game world and the relevant data visually in a customisable way. It is currently in alpha and we want to work with our community to improve it - we have more features in the development pipeline to be released in the coming month.