Message Areas - "World file compression findings"
Train-Sim.Com Message Areas
"World file compression findings"
Email this topic to a friend
Printer-friendly version of this topic
Bookmark this topic (Registered users only)
Previous Topic | Next Topic Conferences MSTS Route Design (Protected) Original message
DKlemm (1273 posts)
Mar-02-02, 10:33 PM (EST) "World file compression findings" Rich and I were talking today and one of things concerns world files and to compress or not to compress. The number one reason in my eyes is disk space, for me it cut 14meg out by compressing. My largest file size was 778k and after compression it was 40k. I also did a test using FPS and stutters as a guage.I started at the north end of the Clinton yard which is a tile with only tracks in it and headed south to Clinton. The next tile is 778k, or 40k compressed. I measured at the same points with and without compression. uncompressed compressed
Start 37 38
38 37
at 'Y' 37 27
repair track 14 19 first sign of scenery
19 25
24 28
stutter 14 no stutter 19
30 26
22 22Numbers stayed the same from that point. What I saw the main difference to be is not having a stutter and not as severe a dip in frame rates and then a leveling out. The leveling out though with compressed was stutter free.David Klemm
Illinois Central Route
Illinois and St Louis Divisions
Ver 0.6 uploaded
Decatur IL 51% seniced
Alert Edit | Reply | Reply With Quote | Top
Table of Contents
Subject Author Message Date ID RE: World file compression findings oboe Mar-02-02 1 RE: World file compression findings Motley24Crue2 Mar-02-02 2 RE: World file compression findings dvdhoven Mar-03-02 3 RE: World file compression findings DKlemm Mar-03-02 4 RE: World file compression findings enocell Mar-04-02 5 RE: World file compression findings DKlemm Mar-04-02 6 RE: World file compression findings OkrasaGhia Mar-04-02 7 RE: World file compression findings davidbeach Mar-17-02 12 RE: World file compression findings bobs Mar-17-02 13 RE: World file compression findings derekmorton Mar-05-02 8 RE: World file compression findings scefhwil Mar-05-02 9 RE: World file compression findings DKlemm Mar-05-02 10 RE: World file compression findings bobs Mar-05-02 11
Lobby | Topics | Previous Topic | Next Topic
Messages in this topic
oboe (120 posts)
Mar-02-02, 11:10 PM (EST) 1. "RE: World file compression findings" Interesting test David ...Do you have to decompress before you can edit ?? Remove | Alert Edit | Reply | Reply With Quote | Top
Motley24Crue2 (428 posts)
Mar-02-02, 11:29 PM (EST) 2. "RE: World file compression findings" I must be living under a rock somewhere...All this about Compress and decompressing of world tiles, how is this done?lol maybe a stupid question that may even get a stupider answer but i have never did this before or if i did i just never knew it Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (645 posts)
Mar-03-02, 04:50 AM (EST) 3. "RE: World file compression findings" Hi,IMHO, the Route Editor decompiles (uncompress) compressed World files. So you don't need to uncompress them before editing.How to compress/decompress.
Well this is very clear explained in one of the TechDocs that come on CD1. I have used this procedure successfully for both compressing and uncompressing world and shapes files.The document is called "How to convert files to Binary format"Dick van den Hoven
Remove | Alert Edit | Reply | Reply With Quote | Top
DKlemm (1273 posts)
Mar-03-02, 11:06 AM (EST) 4. "RE: World file compression findings" Oboe; I concur with Dick. When you edited in RE and the world file is compressed, MSTS will uncompress it. So I have added to my packaging steps to comress the changed world files.MotlyCrue; The tech doc works real well. The difference will be in what version of windows you are using and the DOS versus command prompt. I'm in XP and there is a slight difference.David Klemm
Illinois Central Route
Illinois and St Louis Divisions
Ver 0.6 uploaded
Working on Decatur IL
Remove | Alert Edit | Reply | Reply With Quote | Top
enocell (497 posts)
Mar-04-02, 02:11 PM (EST) 5. "RE: World file compression findings" Is there a way to make a batch which would compress all .w files at once? It's very tedious job to do manually.Enocell Remove | Alert Edit | Reply | Reply With Quote | Top
DKlemm (1273 posts)
Mar-04-02, 02:18 PM (EST) 6. "RE: World file compression findings" If you follow the steps in the Tech Doc it leads you to a convert.bat file. In that file are all .w (or.s) files listed. It then has you put on the front the ffeditc and end stuff to each line. Then when you run convert it does its work on every file listed in it. Boy I hope that made sense?Statement to convert the bat is something like; dir /b/s /out .w. Look in the tech doc as this is from memory.
David Klemm
Illinois Central Route
Illinois and St Louis Divisions
Ver 0.6 uploaded
Working on Decatur IL
Remove | Alert Edit | Reply | Reply With Quote | Top
OkrasaGhia (277 posts)
Mar-04-02, 02:28 PM (EST) 7. "RE: World file compression findings" LAST EDITED ON Mar-04-02 AT 02:30 PM (EST)Sure is, I made batches for all the standard routes this weekend to try update them for XTracks compability.Dos-shell> dir/b *.w > w.batOpen up w.bat and insert ffeditc_unicode at the start of each line (replace the initial 'w_' with 'ffeditc_unicode w_').
Add '/c /o:.w' to the end of each line (replace '.w' with '.w /c /o:.w').
You end up with each line like (don't remeber exactly the file name):
ffeditc_unicode w_62817_71873.w /c /o:.wThe '/o.w' makes ffeditc_unicode replace the existing file overwriting the original.
Change the '/c' to '/u' to decompress.The XTracks update was successfull for all routes but Marias, don't know why yet but it does not want to rebuild.
Might upload the updated files as an easy to install package to use with XTracks.
//Okrasa
Chief Engineer
okrasaghia @ yahoo.com
http://www.geocities.com/okrasaghia
Steam: 0-4-0T #9, 0-6-0 #12, 2-6-0 #25, 2-6-6-2 #37, 2-8-2 #40
Diesels: SW8 #16, F3 #53, F7 #54, FP7 #57, Budd RDC #61, TrainMaster #88 Remove | Alert Edit | Reply | Reply With Quote | Top
davidbeach (103 posts)
Mar-17-02, 01:45 AM (EST) 12. "RE: World file compression findings" I tried this on the USA1 route to test a modified tsection.dat file, and somehow ffedit is fouling up the world files as it converts them to text, secenry objects doing horrible, strange things. Any ideas how to avoid having ffedit do more harm than good? Remove | Alert Edit | Reply | Reply With Quote | Top
bobs (491 posts)
Mar-17-02, 03:27 PM (EST) 13. "RE: World file compression findings" I've found some strange happenings with FFEDIT too.I had a text-form .w file and ran FFEDIT on it. Instead of saying it compressed it to binary, it said it compressed it to text. Sure enough, it was smaller, but not really small. It wasn't readable, but it wasn't binary either. I ran FFEDIT again and this time it compressed to binary. Other than the original being a very large .w file, I don't know why this happened.Also, I accidentally ran FFEDIT to compress an already-compressed binary file. The end result was a mess, with objects flying through the air upside down, disappearing, etc. I seem to recall that editing that particular tile repaired the damage, but I can't say for sure. Remove | Alert Edit | Reply | Reply With Quote | Top
derekmorton (363 posts)
Mar-05-02, 01:54 AM (EST) 8. "RE: World file compression findings" From a dos box you could try:-for /F "eol=; delims=," %%i in (dir *.w/s) do compress.bat %%iDerek EngMod@leder.com.au Remove | Alert Edit | Reply | Reply With Quote | Top
scefhwil (117 posts)
Mar-05-02, 02:33 PM (EST) 9. "RE: World file compression findings" I think I'm right in saying this, that the use of the discription "compression" for .w files is misleading (also for .s files). The term should really be "compile". The files are converted from a text format to binary format. So the description "CarSpawner" in the .w file is changed from being 10 16bit values long to being a single 16bit value (or 8bit, or whatever, the point is it is reduced to a sixteenth of its size, in this case). Hence why the file size drops so much. This also explains the lack of a stutter. The game engine stutters when it pauses to do a real-time compile of the .w file. Pre-compile it and you save the game engine some work. Remove | Alert Edit | Reply | Reply With Quote | Top
DKlemm (1273 posts)
Mar-05-02, 03:21 PM (EST) 10. "RE: World file compression findings" You are probably saying it more correctly then me, I stand corrected.David Klemm
Illinois Central Route
Illinois and St Louis Divisions
Ver 0.7 uploaded
Decatur IL 51% done, off playing with trains and doing research for the next update!
Remove | Alert Edit | Reply | Reply With Quote | Top
bobs (491 posts)
Mar-05-02, 03:47 PM (EST) 11. "RE: World file compression findings" What I've never figured out is why, if the route editor is smart enough to de-compile/de-compress a file when you edit it, why can't it recompile/compress it when you save it? Why make that a stand alone step that many people will miss? Remove | Alert Edit | Reply | Reply With Quote | Top
Lock | Archive | Remove
Lobby | Topics | Previous Topic | Next Topic
Restored from the Train-Sim.Com archive, captured May 25, 2002. About this archive.