Sprite formats used in old games

Started by
23 comments, last by mnn 13 years, 7 months ago
Hi, I'm trying to read sprites from an old game, but I don't know where to begin.

What were (un)common sprite formats used back in 1997's?
Advertisement
Many of them were proprietary, so it depends on the game.
Most likely they would have employed a combination of RLE encoding and palettes to save space, or they may have been encoded in a fashion that was not necessarily space-efficient but instead allowed more direct processing by whatever rendering method was used (efficiency in performance).
http://www.sendspace.com/file/k5thmr

This seems like it has RLE encoding, but I'm not able to find related palette file.
First two words in that file are 40h == 64d. 64x64 = 4096. 4096x2 = 8192. The file is 8198 bytes.

packed struct Image {  unsigned short width, height;  unsigned short unknown;  pixel data[width][height];};


The file is not compressed (also confirmed by 3:1 compression in zip), all that remains is to find out what individual pixels mean. On old hardware there were many exotic layouts, so looking into PCX bitplanes or similar might offer some insight.

Since each pixel appears to be 16 bits, it's possible there are 4 64x64 images in there with 4-bits per pixel.

The value of unknown is 7002h, where 2 could mean there are 2 64x64 images.

Just looking at the dump, with lots of 4s and 3s I'm reminded of PCX-like format.
Antheus: Thanks, I'll look into it.

This is another file, probably contains animations. It has interesting pattern, so I thought you might recognize it.

http://www.sendspace.com/file/yc2ytc
Does the file have an extension? Have you tried looking it up on Wotsit? www.wotsit.org

throw table_exception("(? ???)? ? ???");

Ravyne: I can't, because those 2 sprites come from container files, which contains only offsets of those sprites.

So basically there is no extension to those sprite files.
Quote:Original post by mnn

This is another file, probably contains animations. It has interesting pattern, so I thought you might recognize it.


That's a different format.

This one is something like:
struct File {  unsigned short a, b;  byte count; //   byte unknown; // since it's same header, this might show contents  unsigned int list1[count];  unsigned short list2;};

But I'm not sure about this, looks like something heavily indexed.

If it's an animation, the list2 might be coordinates of where to draw fragments. No clue, really.
Contents of list1 add up to more than file size, so it doesn't seem to be chunk lengths or file offset.
Antheus: Thanks to you I'm able to read & display the terrain :)



Though I'm stuck with these units/buildings (dots).

So I think that animations should be just simple sprite sheets. Too bad that the format for units/buildings is so "ugly" :(

Edit: I think that the format of the last file, I posted is compressed.

I noticed 0x4040 sequences throughout the file (64d, 64d). Could it be that the list, which comes after list2 could be some kind of RLE table?
struct element {    byte offset;    byte count;}
Offset would point to data after that list.

What do you think?

[Edited by - mnn on September 21, 2010 11:32:51 AM]
Bump.

Antheus: Could you help, please?

This topic is closed to new replies.

Advertisement