Gamedev:Buildpics: Difference between revisions

From Spring
Jump to navigationJump to search
Bruski (talk | contribs)
No edit summary
Bruski (talk | contribs)
No edit summary
Line 6: Line 6:


<div align="center">
<div align="center">
<table width="95%" border="1">
<table width="90%" border="1">
   <tr>
   <tr>
     <th width="10%" bgcolor="#C0C0C0">Requires Buildpic tag</th>
     <th width="10%" bgcolor="#C0C0C0">Requires Buildpic tag</th>

Revision as of 09:56, 12 March 2006

The buildpic is the small picture of a unit which appears in the build menu of its constructor. It is always 96x96 pixels regardless of the format used (see below), and it must always be located in the unitpics directory.

Spring supports multiple image formats for buildpics. These formats are PCX, JPG, BMP, and DDS. By default, Spring will load unitname.pcx, where unitname is the short name of your unit. To override this and use a different format, use the Buildpic tag in the FBI file.

Here's a detailed list of the formats supported:

Requires Buildpic tag File Extension Color Depth Description
No PCX 8-bit (256 colors)
Lossy (palette)
A PCX file. You're not limited to the Total Annihilation palette, but only 256 colors pcx are supported. Quickest to use if you're converting TA units since it's what TA uses but not recommended for use in Spring.
Yes JPG 24-bit (16.7 million colors)
Lossy (compression)
A standard JPEG file. Excessive compression is not recommended since it will reduce quality, but much smaller than BMP
Yes BMP 24-bit (16.7 million colors)
Non-Lossy
A standard Windows bitmap file. Recommended because of the high color depth and no loss due to compression or palette. However, BMP files are notorious for having large filesizes.
Yes DDS 24-bit (16.7 million colors)
Slightly Lossy (compression)
Nvidia's DirectX-enabled .dds format. This is how the maps in Spring are stored. It offers compression, but it can be lossy. It is also difficult to work with. Other formats are still recommended.

Although JPG will lose some quality compared to BMP its file size is drastically smaller even on the lowest compression settings, this will drastically reduce the size of your mod especially if it has a large number of units. Also it has been noted that since spring loads things on the fly large buildpic files can create lag when you first select a factory or construction unit.