Phil Steinmeyer
11-11-2005, 03:12 PM
So I'm making an ActiveX version of my game. My budget is 1MB for everything, compressed. Unfortunately, just my EXE alone is about 310K, compressed. I'm not thrilled about using 1/3 of my budget on that.
I've never really had to optimize for small EXE size before, so I'm looking for thoughts/suggestions.
1) I'm not linking in any DLLs - had to move needed functionality into my EXE.
2) My framework is fairly thin, though I've brought in some bits of the PopCap framework to replace SDL stuff I linked to in DLLs
3) I'm using VS.Net 2003. Unfortunately, if I dynamic link in the main DLL, it links to msvcr71.dll, which few users have, unlike the older msvcrt.dll, which was universal on my target audience. So I have to static link instead (which is still much more efficient than packaging in msvcr71.dll, but it does add 50K to my compressed EXE size.
4) I played a bit with compiler settings. I can't turn off exceptions because of the PopCap stuff - not sure if that bloats things or not anyways. 'Favor size over speed' option was only a small win - 8KB compressed. Not sure if there are any other 'flip this bit and make your EXE 50K smaller' options - anyone know of any?
Other suggestions?
And for those of you making web versions of your games, what's your overall size budget (compressed)?
I've never really had to optimize for small EXE size before, so I'm looking for thoughts/suggestions.
1) I'm not linking in any DLLs - had to move needed functionality into my EXE.
2) My framework is fairly thin, though I've brought in some bits of the PopCap framework to replace SDL stuff I linked to in DLLs
3) I'm using VS.Net 2003. Unfortunately, if I dynamic link in the main DLL, it links to msvcr71.dll, which few users have, unlike the older msvcrt.dll, which was universal on my target audience. So I have to static link instead (which is still much more efficient than packaging in msvcr71.dll, but it does add 50K to my compressed EXE size.
4) I played a bit with compiler settings. I can't turn off exceptions because of the PopCap stuff - not sure if that bloats things or not anyways. 'Favor size over speed' option was only a small win - 8KB compressed. Not sure if there are any other 'flip this bit and make your EXE 50K smaller' options - anyone know of any?
Other suggestions?
And for those of you making web versions of your games, what's your overall size budget (compressed)?