map file size when up-/downloaded

Designed a level that creates new, exciting, and challenging Armagetron game play? Or maybe just something funky. Put it right here.
Post Reply
Wik
Average Program
Posts: 72
Joined: Tue Aug 10, 2010 1:32 pm

map file size when up-/downloaded

Post by Wik »

Ohai!

Scenario:

1. I make a map. When finished, the file size is 20 KB.
2. I upload it to my webspace (FTP binary). Still 20 KB.
3. A client needs to download the map in-game.
4. The downloaded file has now 22 (23, 25, ...) KB, though the code has not changed. (except for the CR/LF, which now are visible in *most* lines)

Why?

My guess is it has to do with the character encoding/processing of AA. Another explanation?

User avatar
Z-Man
God & Project Admin
Posts: 11438
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: map file size when up-/downloaded

Post by Z-Man »

File sizes given can be the true file size or the actual space used on the hard disk, which is essentially the true file size rounded up to a multiple of the block size (which varies). A small size increase due to trivial modifications to whitespace can bump the size up. To say more we'd need to see the files.

Wik
Average Program
Posts: 72
Joined: Tue Aug 10, 2010 1:32 pm

Re: map file size when up-/downloaded

Post by Wik »

Real file size.

The .rar attached contains a design study, before upload/after download to/from my repository. Their difference is 324 bytes, but the only (to me) visible thing are five additional CR in the "new" one.

I can reproduce this with every map; degree of inflation varies from around 50 Bytes to several KB so far.

User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: map file size when up-/downloaded

Post by dlh »

What's the link for the map served by your web-server? Maybe it's some strange Content-Type issue or a strange Apache mod that is messing with the response.

Also, are you opening the downloaded file in a text-editor (perhaps one that converts line-endings) before you check its size?

User avatar
Z-Man
God & Project Admin
Posts: 11438
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: map file size when up-/downloaded

Post by Z-Man »

I see additional CRs in every line, using 'less'. The file has 324 lines:

Code: Select all

[email protected]$ wc -l after/x-0.aamap.xml
324 after/x-0.aamap.xml
[email protected]$ wc -l before/x-0.aamap.xml
324 before/x-0.aamap.xml
So there, mystery solved.

Wik
Average Program
Posts: 72
Joined: Tue Aug 10, 2010 1:32 pm

Re: map file size when up-/downloaded

Post by Wik »

Hm. One in every line, ok. But additional... why? Strange.
I'm using notepad.exe, which is not known to convert anything.

EDIT: dlh might be right. Text-based files (html/php) fetched from my webspace seem to share this disease. Must be sort of normal then, and /me just didn't notice before.

PS: any tips to reduce flickering/fps dropping on a map?

User avatar
Ratchet
Match Winner
Posts: 780
Joined: Sat Mar 15, 2008 5:55 am
Contact:

Re: map file size when up-/downloaded

Post by Ratchet »

Reduce round lengths. Turn alpha_blend to 0.

Just a few quick solutions ;)
Image
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean

Post Reply