Template:TRS-texture.txt files

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Email exchange giving arguments made by James Moody to always use texture.txt files Except for the DLS 240x180 thumbnail.

Hi everyone :-)

> Hi guys, you'll fnd the mindset on this 'INTERESTING' See this:

> http://online.ts2009.com/mediaWiki/index.php?title=%22Thumbnails%22_container&diff=5458&oldid=5363

> when I expanded the thumbnails table on the Wiki, then one of the few

> actual edits Moody made after one of my changes... indicating their

> thinking was this .texture reference as a preference.

N3V Games' version manager James Moody replys (truncated)
My recommendation is to absolutely 100% definitely reference a .texture

for anything that appears in-game in either driver or surveyor.

If Trainz encounters something that it needs to render in-game that isn't a .texture, even if it's part of the UI, it has to hack it into one on the fly. This won't be as good a texture (or as fast to use) as if CM had done it in advance at commit time.

The exception is obviously for stuff that's intended for the web (e.g. the DLS), where you will want something a web browser understands. That's why we use .jpg for the DLS thumbnail.

For most assets, this is "just" a performance issue, causing a disk access (and consequently a brief stutter) every time the image is encountered. However, there's actually a more serious problem hidden here too.

If an asset gets widely used, it is likely to turn up as part of the built-in content set in a future game version, or maybe as a dependency of a DLC content pack. These assets are distributed in a form that is stripped of source textures to reduce the size of the download. If you have a .texture.txt, and still reference the source image (e.g. .tga) directly, then this will be an outright fail in this case. It's not just slower, it literally doesn't work at all. (italics emphasis added) You get an empty box - either 100% black or 100% white depending on circumstances, because that file is literally missing.

If you want to see this bug in action, go make a consist in TS12 (or TS2010 for that matter...) using built-in rolling stock. Most of it doesn't have consist preview icons -- precisely because the content has this bug.

—James Moody, emails September 16, 2014 12:24 EDST (Boston) to five members of Yesterdayz-Trainz