Making Custom Graphics

Project TI-Trek is built using a default set of sprites; These sprites may be changed by generating your own graphics pack Application Variable to replace the one that is provided by default. There are a few stipulations, however. Firstly, you cannot replace the error icons or splash screen... those are a part of the program itself. You can, however, replace any sprite or icon that is a part of the GUI: ship sprites, informational icons, module icons, tab icons, etc. While the sprite you use does not matter, the order in which they occur does. The program expects the sprites to occur in the order they are built in, and if this assumption is in error, your GUI will look quite strange.

Eventually, the Web Deck will contain an interface for doing all of this, but until then, you will have to follow the procedures outlined below.

*** This information may change between default graphics version releases. Be sure to check it out whenever there is a new graphics release.

Required Order of Sprites & Other Metadata

Here is the order in which the sprites must occur:

Deflection Power
16 x 16 -- Indicates the base damage resistance of a shield module.
Frequency
11 x 11 -- Indicates the frequency of a shield module and weapons.
Health
11 x 11 -- Used in the "More Info" dialog to indicate module health.
Hull Integrity
10 x 10 -- Indicates overall hull health.
Power Draw
11 x 11 -- Indicates how much power a module drains from the core or backup power while online.
Power Spend
11 x 11 -- Indicates how much power a module spends when used or if online (depending on type)
Shield Integrity
10 x 10 -- Indicates overall shield health.
8 - 11. Unused Sprites
N x N -- You can make these 1x1... they aren't used and will removed in the next release. (Removed as of 0.0.94)
Source - Main
11 x 11 -- Indicates a module is drawing from main power.
Source - Reserve
11 x 11 -- Indicates a module is drawing from internal reserve.
Mains Tab Icon
24 x 24 -- Indicates we are viewing Main Systems overview.
Ship Interior - Left
160 x 240 -- The left side of the GUI (specs)
Ship Interior - Right
160 x 240 -- The right side of the GUI (specs)
Tactical Tab Icon
24 x 24 -- Indicates we are viewing Tactical Systems overview.
Ship - Side View
24 x 24 -- A view of the user's ship from the side. This is where you can insert your own ship design.
Ship - Top View
24 x 24 -- A view of the user's ship from the top. This is where you can insert your own ship design.
Module Icons
12 x 12 -- An array of icons representing system modules, in the following order:
  1. life support
  2. energy core
  3. "warp" drive
  4. sublight engines
  5. navigational sensors
  6. transport
  7. shields
  8. hull armor
  9. phasers
  10. projectile/torpedo
  11. targetting sensors

Sprite Specifications

This section will detail any sprites that have certain specifications you must abide by.

Ship Interior
The ship interior must contain a viewing window onto which the data or rendering of space is projected. This window's boundaries are from: (10, 14) to (310, 184), a 300 x 170 space. It is recommended to leave this black or close to black, as colors that contrast black are used in the GUI. Also keep in mind that the Left and Right components of the ship interior sprite are two halves of the same full-screen image.

Writing the Graphics Pack with convimg

convimg, the program used to generate the graphics pack, requires a certain format in its config file. The file contains blocks of - converts and - outputs which provide directives to the binary on how to recode the data. Below, you will see a template file that can be used to generate a proper pack for this game.

                converts:
                    - name: <whatever you want>
                      palette: xlibc
                      transparent-color-index: 0
                      style: rlet
                      images:
                        # path to each sprite to include
                        # follow the order specified above
                    
                outputs:
                    - type: appvar
                      name: TrekGFX        # This must match as written
                      source-format: c
                      include-file: TrekGFX.h
                      lut-entries: true
                      archived: true
                      header-string: "\xff\xff"
                      converts:
                        - <name of convert you used>