Map file format

Dr Zaius

Chief Defender of the Faith
Joined
May 1, 2001
Messages
8,902
Reaction score
408
Location
The Forbidden Zone
First name
Don
Country
llUnited States
Do TacOps maps have to be in .bmp format, or can you use .jpg files too? Bmp files are good, but they are also huge.
 

MajorH

Member
Joined
Feb 16, 2004
Messages
866
Reaction score
0
Location
San Antonio, Texas
Country
llUnited States
I took a pass last year at switching to PNG format instead of BMP format in TacOps. It turned into a nightmare real quick because so many of the Windows graphic API calls use bitmaps whose fields and data structures are the same or very similar to those of BMP format. The existing code needed so many on the fly conversions that the speed hit would have left too many older computers behind. A near total rewrite would have fixed most of the issues but I decided I had better things to do with two or three months of coding and testing time.

Or I could have solved most of the problems in a few weeks by moving to Apple Quicktime drawing routines but then the Windows users would have had to install Quicktime. I don't trust Apple Inc enough anymore to require that.

That being said, I hope to eventually try to switch to using PNG format for art files that are stored on hard disk.
 

Dr Zaius

Chief Defender of the Faith
Joined
May 1, 2001
Messages
8,902
Reaction score
408
Location
The Forbidden Zone
First name
Don
Country
llUnited States
I'm currently looking at ways to reduce the file size of a few TacOps maps a bit. I understand that TacOps maps must be in .bmp format, but is there a specific color setting that they must adhere to? Can they be reduced to 256 or even fewer colors and run okay? Most of the TacOps maps I have seen are faily simple so reducing the colors shouldn't even be noticeable--if the game will accept them that way.
 

MajorH

Member
Joined
Feb 16, 2004
Messages
866
Reaction score
0
Location
San Antonio, Texas
Country
llUnited States
All of the maps that I produce are saved at 8 bits or 256 colors. End users have occasionally contributed maps that were saved with a greater color setting (16 bit or higher) but I have always converted them to 256 colors before adding them to the TacOps CD.

The six new USMC maps (7 or so megs for the 29km by 30 km maps) that we have been discussing are already at 256 colors. Their size can be reduced significantly for storage by zipping them. Of course they would have to be unzipped before being usable for TacOps play.

TacOps does not take over the OS when it is launched. It will not insist that a player change his OS setting based on how maps were saved. The game engine will display the maps at whatever color setting the player is currently using on his OS. If the user has his OS set at thousands or millions of colors then TacOps will load the maps at the higher setting. The user won't see any more colors than what were already in the maps and much more memory will be required but TacOps won't object.
 

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
The BMP file format allows compression inside the file, a huffman encoding individually for each color channel IIRC.

Depending on what kind of BMP loader the Major uses you might try that. If the Major loads BMPs with his own code or uses a simple library it is probably not supported. The compression theoretically allowed in BMPs is lousy and people just use a decent format when they want compression.
 

Dr Zaius

Chief Defender of the Faith
Joined
May 1, 2001
Messages
8,902
Reaction score
408
Location
The Forbidden Zone
First name
Don
Country
llUnited States
Yes, I already discovered thay are at 256 colors. So be it. They are large, but not so huge as to prohibit posting them.
 
Top