Simcity 3000 Sprites

Textures, recreate headers, conversions, algorithms and parsing of image files
wattostudios
Posts: 20
Joined: Fri Jun 02, 2017 2:15 pm

Simcity 3000 Sprites

Post by wattostudios »

Hi experts,

I'm interested in trying to view the sprites used in the game Simcity 3000.

From looking at the format, I'm assuming that it's going to be using a RLE or control-character encoding on the sprites. This is the way that it was used in other similar games from Maxis (eg Simcity 2000 and The Sims, both of which there are sprite viewers for), and the way that the sprites are used in Simcity 3000 should be somewhat similar. For example, a building is likely to have multiple zoom levels and rotations, in the same way that it does in Simcity 2000 and The Sims.

Both those games run off a control-character RLE-like schems, where some control characters describe the number of transparent characters to skip, and others represent the color palette indexes to copy. In Simcity 2000, there is a common color palette. In The Sims, there are color palettes for each Object. In the Simcity 3000 sprites, I haven't found anything to suggest a common color palette, so I'm assuming the color palette (or actual pixel data) is contained in each sprite somewhere.

This link describes the Simcity 2000 format: https://github.com/CahootsMalone/simcity-2000-stuff/blob/master/docs/simcity-2000-sprite-format.md
This link describes the The Sims SPR2 format: http://simtech.sourceforge.net/tech/spr2.html

I'm guessing that this is the general format of the sprite files - I may be totally wrong. I'm hoping that someone here is able to better analyse these files and figure out how to generate the images...

Code: Select all

// HEADER (40 bytes)
  4 - Unknown (261)
  4 - Unknown (32768)
  4 - Image Width?
  4 - Image Height?
  4 - Decompressed Data Length?
  4 - Compressed Data Length?
  1 - Unknown (11/12)
  4 - Decompressed Data Length?
  2 - Image Width?
  2 - Image Height?
  2 - Unknown (4)
  2 - Unknown (5)
  2 - Unknown (31775)
  1 - Unknown
   
// ROW CONTROL DATA
  // for each row
    1 - Position?
    1 - Control Character (2-bits = control, 6-bits = count)
   
    if (control == 2){ // eg 128
      1 - null
     
      if (count != 0){
        2 - Unknown
        }
      }
    else if (control == 1){ // eg 92
      1 - null
     
      // repeat X times{
        3 - Unknown
        }
      }
    else if (control == 3){ // eg 221
      1 - null
      }
    else if (control == 0){
      ?
      }
     
    2 - End of Row Control Data Marker (0)
     
// PALETTE
  // for each color
    3 - Color (RGB)

// FOOTER
  1 - End of Palette Marker (17)
  2 - null



You can get some of the sprite files from here... https://drive.google.com/file/d/1cHGlA2m8q-eR6L3kxZOzS7alV6BR2KEQ/view?usp=sharing . These are all from an archive called RESIDENTIAL.DAT, and based on all the other archive filenames, these are all likely to be residential buildings. I have included some of the smallest and largest files in the archive.

Thanks for anyone who can assist,
watto