Trimming TGE
by Matthew Rudge · in Torque Game Engine · 02/13/2007 (9:51 am) · 7 replies
Hi everyone,
I made a mistake of posting this on a public forum, so I'll try here instead. :)
I have heard that the Torque engine release build (ver. 1.5) can be trimmed down to ~1.5 mb. I do realize that it depends on the game you are making, but I was wondering if anyone knew offhand which parts of the Torque engine are a good candidate to trim out, thereby lowering the footprint size of the final executable. More specifically, I'm wondering if there are any parts of the code base that are outdated and/or rarely used if we are developing for a Windows system.
Thanks for your help,
~Matt
I made a mistake of posting this on a public forum, so I'll try here instead. :)
I have heard that the Torque engine release build (ver. 1.5) can be trimmed down to ~1.5 mb. I do realize that it depends on the game you are making, but I was wondering if anyone knew offhand which parts of the Torque engine are a good candidate to trim out, thereby lowering the footprint size of the final executable. More specifically, I'm wondering if there are any parts of the code base that are outdated and/or rarely used if we are developing for a Windows system.
Thanks for your help,
~Matt
#2
If you don't want the default editors available, you can remove most engine code handling these: WorldEditor.cc, EditTSCtrl.cc, and so on.
If you have no plans for cross platform support, you can try something tricky. Remove all the platform code related to OS and Linux, if you are going for pure Windows application programming.
If you need specifics, let me know, but that should get you going in the right direction. I'm not sure how much that will take care of, but it should be a decent chunk.
02/13/2007 (10:02 am)
3rd Party apps aside, there are a few things you can remove from the engine depending on what you want in the final product.If you don't want the default editors available, you can remove most engine code handling these: WorldEditor.cc, EditTSCtrl.cc, and so on.
If you have no plans for cross platform support, you can try something tricky. Remove all the platform code related to OS and Linux, if you are going for pure Windows application programming.
If you need specifics, let me know, but that should get you going in the right direction. I'm not sure how much that will take care of, but it should be a decent chunk.
#3
02/13/2007 (10:14 am)
Note that typically the .exe size is almost negligable compared to assets like GUI, Textures, 3D Objects, etc.
#4
Since we work in a casual game space, every bit we can shave off of the footprint is important. Downloading an installer that is 20mb is pushing it for some people, especially when they want to play it immediately (and they are downloading with a land line modem).
UPX sounds interesting, but I'm not sure how compatible that would be with Windows Vista. Vista does not let you decompress or write anything to your application directory after install. We ran into that problem with packed assets.
Thanks for the code suggestions, Michael. I'll poke around into some of those files, especially the platform related code, and make sure that unnecessary operating system code is not being compiled into the final executable. I'll let you know if I run into any problems or if a question pops up.
Thanks again!
~Matt
02/15/2007 (9:34 am)
Thanks all for replying!Since we work in a casual game space, every bit we can shave off of the footprint is important. Downloading an installer that is 20mb is pushing it for some people, especially when they want to play it immediately (and they are downloading with a land line modem).
UPX sounds interesting, but I'm not sure how compatible that would be with Windows Vista. Vista does not let you decompress or write anything to your application directory after install. We ran into that problem with packed assets.
Thanks for the code suggestions, Michael. I'll poke around into some of those files, especially the platform related code, and make sure that unnecessary operating system code is not being compiled into the final executable. I'll let you know if I run into any problems or if a question pops up.
Thanks again!
~Matt
#5
I UPX'ed all the 1.4.* release prioring to creating the installer and IIRC GG did the same on the windows side before creating the windows installers
02/15/2007 (12:13 pm)
Quote:UPX is pre install / pre installation packageing. You would UPX the .exe before creating the final release/installable package.
UPX sounds interesting, but I'm not sure how compatible that would be with Windows Vista. Vista does not let you decompress or write anything to your application directory after install. We ran into that problem with packed assets.
I UPX'ed all the 1.4.* release prioring to creating the installer and IIRC GG did the same on the windows side before creating the windows installers
#6
02/15/2007 (12:41 pm)
As well UPX does not decompress do HD but decompress to RAM upfront execution. That means that the "startup" takes a little longer *not really noticable*
#7
~Matt
02/16/2007 (10:13 am)
Ah, okay. It's good that it is a pre-installation package and decompresses to RAM. I'll look into it then. Thanks for the info!~Matt
Associate David Montgomery-Blake
David MontgomeryBlake