Check-in previews
When working with assets and code in a complex project it's useful store all of the files in a central repository, called a revision control system. Whenever files are updated in this repository, the revision control system makes a note of the modification and saves the new version. The revision control system also keeps the old version of the file, and later on it's possible to revert back to it or look at the history of all the modifications made to the file.
Our revision control system (Subversion) setup so that every time someone on the team submits a change to the project it sends an e-mail notification to the other team members. These e-mails have the names of the affected files, who changed them, and a short description of the change. Since the Natural Selection 2 team is distributed all over the world – quite literally – we use this mechanism to help update everyone on what's happening day-to-day and minute-by-minute.
These e-mails work well for source code where the description really tells you everything you'd want to know about change. For example, “Fixed bug where resource towers could be placed off of a node” lets you know exactly what that change does and what the effect on the game will be. We use the same system for our art assets, but with image changes, a text description like "Updated ceilingspot02a.vtf" isn't very helpful. Unlike the code change, where the description points to an easily recognizable bug or feature, the in-game effect of this image update is not obvious.
Last week, Charlie suggested a simple improvement to our checkin messages that we thought might be useful for other distributed teams that check out this blog. The screen shot below shows one of our new improved check-in messages in my inbox:
In this check-in, JJJ1 (Jason Lange) updated the self-illumination part of the one of the ceiling textures. Now instead of just telling us which image file has changed, the new check-in message also includes a snapshot of the new texture so we can see the change at a glance. Perfect!
The implementation of this with Subversion was pretty straight forward since Subversion executes a PHP script every time a change is committed. Attaching a preview was just a matter of detecting if any of these files use Valve's texture format (VTF), grabbing them from Subversion and running a VTF to JPEG conversion using a combination of VTFCmd and ImageMagick. The final result is attached to the outgoing e-mail which we send using Blat.