Binaries preview for game developers
Tons of game developers are now constricted by old diff tools that are not able to compare or generate previews from raster graphics files, custom binary files or texture files. Dry your tears, Plastic SCM is here to help you.
I'm going to explain how to configure an external tool to get previews and generate diffs from your complex gaming files.
Configure the preview tool
Go to the new section called Preview tools in your Plastic SCM Preferences window, click Add. The proposed template is ImageMagick, you can select it as the default preview provider, it's a really cool tool that recognizes a great amount of binary file extensions, and it's free!
We use ImageMagick through convert.exe and identify.exe programs. Make sure you write the full path to both ImageMagick binaries since there's another convert.exe on c:\Windows\System32
and this windows binary is first on your path environment value! You will find the programs inside the ImageMagick installation directory.
The first program (convert) is used to generate the thumbnail image for the preview functionality and also for the full image size used by the differences tool. The second program (identify) is used to get the file properties inside your binaries files, this last one is optional. Click the Ok button and you will have the new template configured.
What happens now
ImageMagick will generate thumbnails and full resolution images for the following file extensions. This thumbnails are used by Plastic SCM to show the previews and the diffs between revisions.
This is a complete list of the supported formats by Plastic SCM using the ImageMagick template:
.aai | .art | .arw | .avs | .bmp2 | .bmp3 | .cals | .cgm | .cin | ||
.cmyk | .cmyka | .cr2 | .crw | .cur | .cut | .dcm | .dcr | .dcx | ||
.dib | .djv | .dng | .dpx | .emf | .epd | .epi | .eps | .eps | ||
.eps3 | .epsf | .epsi | .ept | .exr | .fax | .fig | .fit | .fpx | .hdr | |
.hpgl | .hrz | .html | .info | .inline | .jbig | .jng | .jp2 | .jpc | ||
.man | .mat | .miff | .mono | .mng | .m2v | .mpc | .mpr | .mrw | .msl | |
.mtv | .mvg | .nef | .orf | .otb | .p7 | .pal | .pam | .pbm | .pcd | .pcd |
.pcl | .pcx | .pdb | .pef | .pfa | .pfb.pfm | .pgm | .picon | |||
.pict | .pix | .png8 | .png24 | .png32 | .pnm | .ppm | .ps | .ps2 | .ps3 | |
.psb | .psd | .ptif | .pwp | .rad | .raf | .rgb | .rgba | .rla | .rle | |
.sct | .sfw | .sgi | .shtml | .sid | .sun | .svg | .tga | .tiff | .tim | |
.ttf | .uil | .uyvy | .vicar | .viff | .wbmp | .webp | .wmf | .wpg | ||
.x | .xbm | .xcf | .xwd | .x3f | .YCbCr | .YCbCrA | .yuv |
Check here the file extension descriptions.
Examples
This is a preview of a pcx
file (Personal Computer eXchange) one of the first widely accepted DOS imaging standards:
This other file preview is generated from a ppm
file (portable pixmap format), a graphics format designed to be easily exchanged between platforms:
Of course you can also use the differences tool in order to review the changes between graphics file revisions, the following video shows the differences between two tga
files, a raster graphics format, check it out.
Next steps
We are currently working on giving "preview" support inside the history view, so you will not see yourself never again downloading a wrong and big binary file, you will be able to see the binary preview and perform diff operations between different revisions without any "update" or "switch to branch" operation.
Now I know that you are going to repeat to me: "My .megaWeird file extension is not recognized by ImageMagick template, I can't use the preview feature on my files" and I will answer you: "You can create your own preview template!!!". Our preview and diff system is 100% compatible with your homebrew templates you just need to code your own "convert" and "identify" toys. In the next blog post I will create my own binary file with my own extension and I'll show you how to get previews and diffs from it.
0 comentarios: