Brass Watch Games

New Shipyard: Big improvements to the ship editor

by Jonah on July 2, 2018

As the first part of the game I created way back in 2013, the ship editor was easily the most naively designed and coded section of the game. My planned redesign of the interface in the never-completed Alpha 1.0 version addressed some of the problems, but the fix was only surface deep. Underneath the new coat of paint, the method of storing and rendering ship designs was still basically unchanged, bringing numerous problems with it. The problems are pretty technical but the extremely simple version is that in the old game, individual systems had no way to store their own variables; everything except their location was defined by the system type. When I later moved on from this concept, I had to come up with awkward, hacky ways to make new ideas work within my own old code. One example of this was “free form” systems, which were really just a blob of separate 1×1-tile systems which changed their sprites to appear connected. Another example is the decorative slope pieces, which were all essentially the same thing with different sprites, but there was no way to store a “direction” variable so each one had to be a completely separate system type.

Working on the new Shipyard, I’ve learned from those old mistakes and designed the ship editor to allow for individual systems to store their own data and determine their own stats instead of all being exact copies of a master template. For example, it’s now possible to have true variable-size systems, which can be a rectangle of any size and are still treated as a single system by the game. This is possible because they can each store their own size variables, independent of each other. You place them by drawing a box the way you would use the rectangle tool in MS Paint.
Similarly, systems like the decorative slopes which have the same stats but different visual styles can now be combined into a single system type with an individual direction variable. In this screenshot, there are only two different system types (1×1 and 1×2 slopes), each with four possible styles that can be cycled with the scroll wheel similar to how weapon directions worked in the old game:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.