NewsUnrealEdFilesModsFragBULiandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 17th May 2008, 08:56 PM   #1
KFHJ
Registered User
 
Join Date: May. 17th, 2008
Posts: 4
Question Strip Package to bare gameplay minimum?

I've recently started developing for UT99 and am working with several friends to betatest my work. My code package is already over a quarter meg (I comment pretty extensively,) changes often, and since one of my testers is in New Zealand and has a maximum monthly download quota, it's getting to be a bit of a pain.

As such, I'm looking for any ways I can find to strip the package as much as possible for my test builds to a minimum size - the source code appears to be well over half the package, and anything else I can ditch without affecting betatests would be nice to get rid of too. Unfortunately this seems to be a bit of a taboo subject (understandably, since some people use it to release mods without source), so I haven't been able to find much via other methods here or elsewhere, even though I've found packages that apparently HAVE been stripped. The tutorials all seem to intend to only involve unstripped packages. For autodownloadables, a stripped .u with source separately in the .zip or .umod seems to be the way to go...? I've also seen vague references to 'partially-stripped' source that doesn't strip declarations - that would be really nice to have if there's a tool out there. Ideally I'm looking for something simple to add to my BUILD.BAT so I can still just run build and immediately host a test game - with my NZ friend being able to join twice as fast with half the impact on his quota.

Thanks in advance for any help on this.
KFHJ is offline   Reply With Quote
Old 17th May 2008, 09:21 PM   #2
Azura
Now with 85.26% less nonsense
 
Azura's Avatar
 
Join Date: Jul. 8th, 2002
Posts: 9,203
Ideally you should strip the comments from your source before compilation. These are included in the package along with the bytecode. This one example of a project where the comments are making up a sizeable portion of the final package size:

http://www.unrealadmin.org/forums/sh...ad.php?t=23777
__________________

(Hosted at imageshag so sig might not display) - Neonite rocks
Azura is offline   Reply With Quote
Old 17th May 2008, 09:52 PM   #3
KFHJ
Registered User
 
Join Date: May. 17th, 2008
Posts: 4
Quote:
Originally Posted by Azura View Post
Ideally you should strip the comments from your source before compilation. These are included in the package along with the bytecode. This one example of a project where the comments are making up a sizeable portion of the final package size:

http://www.unrealadmin.org/forums/sh...ad.php?t=23777
Wow, seriously? Can't imagine why they'd keep any semblance of the comments in the actual bytecode, that's kind of against coding principle, isn't it? I suppose it slows execution too, so comments in a tight inner loop are pretty harmful if not stripped? Which means, all in all, I need both a pre- and post- processor to best serve my NZ friend? All the more reason to separate source from the actual gameplay package, too, I suppose, since comments help readability so much. Thanks...

Last edited by KFHJ; 18th May 2008 at 04:26 AM. Reason: typo
KFHJ is offline   Reply With Quote
Old 17th May 2008, 11:11 PM   #4
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,524
It isn't what you think. In the bytecode the comments do not exist, but remember when you compile packages, the compilers also stores the original text version of the script within the package as well. This allows UnrealEd to see the script without having to decompile the bytecode.
__________________
I make the impossible possible ... ... ... to some extent.

Development blog
[SAS]Solid Snake is offline   Reply With Quote
Old 18th May 2008, 04:25 AM   #5
Azura
Now with 85.26% less nonsense
 
Azura's Avatar
 
Join Date: Jul. 8th, 2002
Posts: 9,203
Open up a U package in notepad and you will see what [SAS]Solid Snake has explained. The stored text is pretty handy for people who are learning from other people's work. The only downside to it is that it can bloat the package size. It doesn't affect execution times.
__________________

(Hosted at imageshag so sig might not display) - Neonite rocks
Azura is offline   Reply With Quote
Old 18th May 2008, 04:43 AM   #6
KFHJ
Registered User
 
Join Date: May. 17th, 2008
Posts: 4
Quote:
Originally Posted by Azura View Post
Open up a U package in notepad and you will see what [SAS]Solid Snake has explained. The stored text is pretty handy for people who are learning from other people's work. The only downside to it is that it can bloat the package size. It doesn't affect execution times.
Then that's just the very source I mentioned the idea of stripping in the first post, which could be readily stripped by a post-processor, no pre-processing needed? That's more what I expected. As I mentioned in my original post I already saw the source code itself (I use a hex editor actually, for that kind of thing) in the file and noticed it's well over half the package file - and would still be a very large portion even with just comments stripped. Either stripping the source entirely in the case of something intended for play only (my private betas), or stripping all but the the declarations UnrealEd/UCC/etc need to see when making something to be linked against, really sounds like the way to go if a package is going to be auto-downloaded, especially over a trans-oceanic network link... and just distro full, liberally commented source separately, where it doesn't impact the auto-download and is as useful as possible, for best results? Harder to learn from someone else's work if you can only see the code you perhaps could have got from a decompile anyways and not the comments and thus intent behind it all, anyways...?
KFHJ is offline   Reply With Quote
Old 18th May 2008, 06:13 AM   #7
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,524
It begs me to ask, how large is your source code? Even when I tally up my source, your looking at about a megabyte or two. It cannot be that much. I live in New Zealand, so I know all about bandwidth caps, and how they are so low here. But even so, so the question is, are you actually including resources *other* than code in your packages?
__________________
I make the impossible possible ... ... ... to some extent.

Development blog
[SAS]Solid Snake is offline   Reply With Quote
Old 1st Jun 2008, 10:21 AM   #8
KFHJ
Registered User
 
Join Date: May. 17th, 2008
Posts: 4
Quote:
Originally Posted by [SAS]Solid Snake View Post
It begs me to ask, how large is your source code? Even when I tally up my source, your looking at about a megabyte or two. It cannot be that much. I live in New Zealand, so I know all about bandwidth caps, and how they are so low here.
A megabyte or two adds up -very- fast when you redownload it many times due to changes. But as I noted in my original post, currently over a quarter meg and growing.

Quote:
Originally Posted by [SAS]Solid Snake View Post
But even so, so the question is, are you actually including resources *other* than code in your packages?
Pure code, no textures/models/sounds/etc. No #EXEC IMPORT, etc. The pre-compile plaintext non-unicode .uc files sum to nearly 180k already. As also noted in my original post, we do a lot of beta testing so there are a lot of different progressive versions being autodownloaded, and the time it takes to download for him is also becoming rather significant. A meg or two, which it may very well reach in due time, would be a huge pain. That's why I need ways to cut it down, and finding a tool to omit unneeded components like the source from that download seems like the most straightforward. After all, the download speed is being impeded by the combination of the overseas connection, my fairly low upload speed, and Unreal's seemingly rather slow transfer protocol, and I pretty often have 2+ people (not including myself) testing, too. All of which literally wouldn't be half so bad if the package size weren't more than double what's actually needed...
KFHJ is offline   Reply With Quote
Old 2nd Jun 2008, 04:40 AM   #9
Wormbo
not paranoid at all
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Quedlinburg, Germany
Posts: 4,088
Quote:
Originally Posted by KFHJ View Post
[...], and Unreal's seemingly rather slow transfer protocol, [...]
Set up a HTTP server for redirected downloads. This has two advantages: You can use the full bandwidth (i.e. not limited to the Unreal netspeed) and you can compress the packages using UCC Compress.

See www.unrealadmin.org for more details on redirect server setup.
__________________
Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> nono
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
Wormbo is offline   Reply With Quote
Old 2nd Jun 2008, 11:55 AM   #10
Azura
Now with 85.26% less nonsense
 
Azura's Avatar
 
Join Date: Jul. 8th, 2002
Posts: 9,203
Why not compress the compiled package using Winrar or something before sending it ? U packages seem to compress pretty well.
__________________

(Hosted at imageshag so sig might not display) - Neonite rocks
Azura is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:22 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Copyright ©1998 - 2009, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by ServerCave