Custom Tools for Game Development
There’s an excellent chapter in Game Engine Architecture about custom tools that are often developed to aid in the making and debugging of a game engine.
Today I’ll talk about the ones I developed for Metric Panda Engine, the game engine that powers Rival Fortress.
The Shell Swiss Army Knife
I spend most of my development time in the terminal, and the way I interact with the game, engine or other standalone tools is through a multi-purpose shell script.
This is what the output of the panda help
command:
The script is composed of a handful of small git
-style shell scripts that delegate the heavy lifting to the appropriate standalone tool or application.
The Asset Preprocessors
I talked in previous posts about the asset preprocessor. It’s a collection of asset related tools that can be run as a command line utilities or directly from the editor.
The tools operate by parsing a JSON
manifest file and are capable of:
- Parsing OBJ and FBX models and converting them to vertex/index buffer streams,
- Validating and minifying GLSL shaders and combining them into shader pool
- Setting up material parameters and default values
- Packing bitmap fonts into multiple texture atlases for different Unicode ranges along with other UI related textures
- Combining and compressing textures
- Converting sound files and packing them based on priority and/or usage order
- Combining and validating LUA scripts
The Meta Reflector
The meta reflector is a preprocessor that generates all sorts of code, ranging from data structures, boilerplate code, validation and data mappings between .ini
configs and runtime data. Take a look at this post for more about it.
The Game Editor
Last but not least is the game editor. This is a module that can be loaded from the game as a dynamic library and allows the interaction with other tools from the GUI as well as manipulation of the game world. I’m still actively iterating on the editor as most of the functionality required surfaces when writing gameplay code.