GSBEdit

Overview

GSBEdit is a tool for modding game data for Gratuitous Space Battles (by Positech Games). It is inspired by tools such as the Tiberian Sun editor SunEdit 2K by Childs Play Software, which a much younger Kemp made extensive use of. The goal was to dramatically simplify the creation of new game content compared to the manual editing of text files previously required.

The source code can be found at Bitbucket.

Screenshot of GSBEdit during development.

Screenshot of GSBEdit during development.

Tools/software/libraries used

  • Programming: Python, wxPython
  • Testing: pylint, clonedigger, nose, coverage

Lessons learned / techniques used

The GUI tabs for the module editor (seen in the screenshot above) are generated based on a simple GUI description structure I developed. The object responsible for creating and hosting the generated GUI elements is self-contained and requires no oversight by the parent window object. This architecture and the description structure used allow for a number of features such as:

  • Automatic alignment of fields.
  • Multiple columns.
  • Highlighting of required fields.
  • Dynamically hiding/showing fields, groups of fields, or entire tabs based on values of other fields.
  • Dynamic calculation of statistics such as DPS values.
  • Notification of changed field values to the parent window.

This provided a significant boost in development speed when extending the module editor beyond the basic options initially implemented and eliminated much of the tedium that can be encountered when implementing a GUI of this type manually.

GSBEdit also provided me with my first chance to apply testing, code analysis, and automated documentation generation techniques to a non-trivial project.

As my first program that was distributed to an audience with a range of computer specifications and varying technical skill levels, GSBEdit taught me valuable lessons in terms of testing and packaging programs. Particularly, even given the constraints on possible configurations dictated by the Gratuitous Space Battles game itself, people had created situations that never occurred on my own PC.