Difference between revisions of "Talk:TERRAIN"

From UFOpaedia
Jump to navigation Jump to search
Line 20: Line 20:
 
Perceivably, the only reason that they would ignore those pixels is if they were using straight mem copy... ?
 
Perceivably, the only reason that they would ignore those pixels is if they were using straight mem copy... ?
 
[[User:Sidewinder58|Sidewinder58]] 12:19, 18 January 2011 (EST)
 
[[User:Sidewinder58|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 [[Image_Formats#PCK|mentioned]], hence why I'm assuming you're talking about pixels). - <span style="font-size:xx-small">&nbsp;[[User:Bomb_Bloke|Bomb Bloke]] ([[User_talk:Bomb_Bloke|Talk]]/[[Special:Contributions/Bomb_Bloke|Contribs]])</span> 19:22, 18 January 2011 (EST)

Revision as of 00:22, 19 January 2011

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)