Sign in to follow this  
CyberRascal

Extremely large executables?

Recommended Posts

CyberRascal    208
Hey everyone, I've noticed that many AAA games have extremely large executables, up to 60-120 mb. I was wondering if the codebase is so large that it actually takes that much (seems extremely large?), or is it because of embedded resources (why not use external ones that are loaded?), or is it part of DRM?

Cheers!

Share this post


Link to post
Share on other sites
Rattenhirn    3114
If you're really interested, grab one of the many PE format viewers/analyzer and have a look.

I suspect it's due to embedded resources, because code itself isn't very big, once you've stripped the debug info.

DRM shouldn't change the size of the executable at all, besides the code/keys/signatures that might need to be added, but these are tiny.

Why resources are embedded rather than loaded "externally" can have a lot of reasons. Maybe something should be hidden from plain sight, or it might speed up start up (since the executable gets the benefits of prefetching on Windows), or it's just convenient.

There's also a thing called "fat executable", where multiple versions of the same executable are embedded within one file, to conveniently (for the user) ship multiple versions (i.e. 32 and 64 Bit Versions, SSE higher vs. SSE lesser,...). Mac OS uses that a lot, not sure about Windows.

Why does it matter to you?

Share this post


Link to post
Share on other sites
CyberRascal    208
Thanks for a quick reply.

I'm just curious, being a newbie at game programming there are many concepts that are very different from other programming. I was just wondering what causes those huge file sizes, if it is something I can apply to my own projects.

Share this post


Link to post
Share on other sites
Rattenhirn    3114
[quote name='CyberRascal' timestamp='1340025656' post='4950233']
Thanks for a quick reply.

I'm just curious, being a newbie at game programming there are many concepts that are very different from other programming. I was just wondering what causes those huge file sizes, if it is something I can apply to my own projects.
[/quote]

I think the size of the executable is the last thing you should worry about! ;)

Also, know that there are things like UPX (http://upx.sourceforge.net/) that can dramatically shrink the perceived size of executables.
Some people use it, some people don't.
Some people prefer DLLs, some people link everything statically.
Some people use a lot of templates, some people prefer uhm, whatever the opposite to that is called.
Some people like embedded resources, some don't.
And so on....

Ultimately, it's a matter of taste!

Share this post


Link to post
Share on other sites
frob    44913
[quote name='CyberRascal' timestamp='1340020613' post='4950214']
Hey everyone, I've noticed that many AAA games have extremely large executables, up to 60-120 mb. I was wondering if the codebase is so large that it actually takes that much (seems extremely large?), or is it because of embedded resources (why not use external ones that are loaded?), or is it part of DRM?
[/quote]
For us a good chunk of it is comprehensive libraries.

Our corporate networking libraries add about 8 MB to the executable. But that 8MB includes all the NAT punchthrough stuff, lobby stuff, P2P or partial mesh networking infrastructure, dynamic reconnect and host migration, mixed reliable/delta UDP, VoIP, encrypted billing access, and much more.

They are one of the biggest benefits of corporate packages.

The downside is that you get an 8MB networking package that few people on the team really understand. The good side is that you get an 8MB networking package that does everything from nat puchthrough to behind-your-back reconnect to practically wiping your nose after you sneeze, and you get it all for no additional cost.


This is true for all the different corporate libraries. The physics library adds another several megabytes; it is more than just crunching numbers, it includes visualizers and debuggers and logging and many other tools that are available in final builds. Repeat again for comprehensive rendering libraries, comprehensive animation libraries, comprehensive audio libraries, comprehensive movie libraries, and other major systems. The size adds up quickly, but the benefits at creating immense games quickly also add up in everyone's favor.

Share this post


Link to post
Share on other sites
mhagain    13430
Another huge advantage of static linking is that you get all of your userbase on a known, common version of your libraries. If you've linked with version 1.0 of libfoo, and have run a comprehensive series of tests with it, then you want to be certain that is the version that everybody is using. You don't want to release and find out that it crashes for the 40% of users who have other versions...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this