Difference between revisions of "Talk:TERRAIN"

From UFOpaedia
Jump to navigation Jump to search
Line 27: Line 27:
 
==Potential maximum MCD record==
 
==Potential maximum MCD record==
 
First I must say that I'm really impressed with the work that you guys put on the Terrain files - I am relearning a few things and learning some new! :)
 
First I must say that I'm really impressed with the work that you guys put on the Terrain files - I am relearning a few things and learning some new! :)
 +
 
My question is this: how were the values for the 'Potential maximum MCD record count' calculated? I can't seem to find the logic behind it. My understanding was that for all terrains with X-COM craft and UFOs, you added the total of MCD records of BLANKS (2) plus the count for the biggest X-COM and Alien crafts, the Skyranger (65) and the Harvester/Supply Ship (106), giving you a total of 173 predetermined records and leaving 83 free MCD slots for the terrain. So the theoretical maximum should always be 256 for any terrain, unless it is proven that the game crashes if an MCD file (like urban.mcd) has more records than it is supposed to.
 
My question is this: how were the values for the 'Potential maximum MCD record count' calculated? I can't seem to find the logic behind it. My understanding was that for all terrains with X-COM craft and UFOs, you added the total of MCD records of BLANKS (2) plus the count for the biggest X-COM and Alien crafts, the Skyranger (65) and the Harvester/Supply Ship (106), giving you a total of 173 predetermined records and leaving 83 free MCD slots for the terrain. So the theoretical maximum should always be 256 for any terrain, unless it is proven that the game crashes if an MCD file (like urban.mcd) has more records than it is supposed to.
 +
 
My 2nd issue is that there are 2 terrains (Forest and Jungle) which have 85 and 84 MCD records, which likely means that those UFOs (Supply Ship/Harvester) will never appear over those terrains (they will be swapped by Farm or another terrain) OR there's some sort of exception to the 256 limit that is being explored by the engine. I can't remember if I ever saw those UFOs on those terrains though. [[User:Hobbes|Hobbes]] 11:48, 9 January 2012 (EST)
 
My 2nd issue is that there are 2 terrains (Forest and Jungle) which have 85 and 84 MCD records, which likely means that those UFOs (Supply Ship/Harvester) will never appear over those terrains (they will be swapped by Farm or another terrain) OR there's some sort of exception to the 256 limit that is being explored by the engine. I can't remember if I ever saw those UFOs on those terrains though. [[User:Hobbes|Hobbes]] 11:48, 9 January 2012 (EST)

Revision as of 16:49, 9 January 2012

Talk Page Moved

I've moved the old contents of this page (which discussed MCD files) here. - Bomb Bloke 03:59, 27 June 2010 (EDT)

TERRAIN Content Files

Two things:

  • If you get all the MCD files from this folder, you will notice that there is no matching TAB and PCK for some of them. Any got a clue as to why?
  • Something that I haven't seen mentioned is that, if you count the number of pixels that you put into your image while converting the bytes of the RLE image data, you will notice that there are a few at the end that must be set to transparent for the image to display correctly when overlayed. I am using 32x40 pixel images. I found that size on the site.

- Sidewinder58

Some of the MCD files just aren't used at all. The first game, UFO, also has entire map files that get ignored.
As for the PCK images, the idea is that the game draws them straight onto the screen - the transparency effect is achieved simply by leaving the pixels that aren't mentioned within the PCK data completely untouched. If you pre-render all your images into sprites, then yes, you'd need to use a transparency flag of some sort, but you can actually just keep parsing the raw RLE stream over and over faster and with less memory usage. Why process transparent bytes when you can simply skip them?
By the way, on these wiki talk pages you can sign your comments by entering four tildes (~~~~). :) -  Bomb Bloke (Talk/Contribs) 19:30, 17 January 2011 (EST)

Perceivably, the only reason that they would ignore those pixels is if they were using straight mem copy... ? Sidewinder58 12:19, 18 January 2011 (EST)

Hmm, I'm not sure whether we're on the same page here. You initially said "if you count the number of pixels that you put into your image while converting the bytes of the RLE image data, you will notice that there are a few at the end that must be set to transparent for the image to display correctly when overlayed" - are the "few at the end" you're referring to BYTES or PIXELS?
If pixels, then it's just a matter of skipping them; when the game run out of image data to draw, it just stops, and so the image underneath gets left untouched. A 32x40 sprite doesn't mean the game draws 1,280 pixels, it only processes the amount of pixels the RLE data tells it to (which can be any figure UP TO 1,280 pixels). If, on the other hand, you meant bytes, then you should be skipping everything once you hit a value of 255 (though this IS specifically mentioned, hence why I'm assuming you're talking about pixels). -  Bomb Bloke (Talk/Contribs) 19:22, 18 January 2011 (EST)

Potential maximum MCD record

First I must say that I'm really impressed with the work that you guys put on the Terrain files - I am relearning a few things and learning some new! :)

My question is this: how were the values for the 'Potential maximum MCD record count' calculated? I can't seem to find the logic behind it. My understanding was that for all terrains with X-COM craft and UFOs, you added the total of MCD records of BLANKS (2) plus the count for the biggest X-COM and Alien crafts, the Skyranger (65) and the Harvester/Supply Ship (106), giving you a total of 173 predetermined records and leaving 83 free MCD slots for the terrain. So the theoretical maximum should always be 256 for any terrain, unless it is proven that the game crashes if an MCD file (like urban.mcd) has more records than it is supposed to.

My 2nd issue is that there are 2 terrains (Forest and Jungle) which have 85 and 84 MCD records, which likely means that those UFOs (Supply Ship/Harvester) will never appear over those terrains (they will be swapped by Farm or another terrain) OR there's some sort of exception to the 256 limit that is being explored by the engine. I can't remember if I ever saw those UFOs on those terrains though. Hobbes 11:48, 9 January 2012 (EST)