This is my experimental game projects site. I will try to release a themed game here at the end of each month
- menucity.zip (817 downloads)
- bugger.zip (649 downloads)
- jonasicecreamstand.zip (298 downloads)
- afro.zip (201 downloads)
- BlackWhite.zip (149 downloads)
- Balls.zip (74 downloads)
- A_Geek_Valentine.zip (43 downloads)
- 7days (25)
- Random (3)
- Dream Games (1)
- General (6)
- Games (7)
- Meta (2)
- Webpage (2)
- News (11)
- Themes (9)
- Postmortems (7)
- Update (2)
- Walkthroughs (1)
- Postmortem: A Geek Valentine
- March Theme: 10 seconds
- A Geek Valentine
- February gets Themed: Rejection
- Why is my file so huge?
- Postmortem: The Chronicles of Bim: The 100 Fake Afros
- A Geek Valentine (1)
- February gets Themed: Rejection (6)
- Jonas IceCream Stand (7)
- Bugger (14)
- The Chronicles of Bim: The 100 Fake Afros (2)
- MenuCity (15)
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
Or visit the Big Archive
January 24, 2010
Why is my file so huge?
My latest game was absolutely huge! And I'm not talking about the music (which was pretty huge too - roughly 20mb) but the little .exe file.
It was 14,6mb!!
Now every way you look at it, that's incredibly huge. It's like comparing an ant to a human. Normally the little ant is the exe file which should be small, except that it's not.

Incredible I thought, what the heck did I do wrong? I mean my code isn't really good but I never knew it was this horrible. So today I was determined to find the cause of this obscene mutant ant.
I started out chopping off everything regarding exceptions, cause all c++ resources I've read say exceptions will take space like a mutant gremlin. Okay I thought and chopped away everything - but nothing happened.
Now that's weird, what happens if I scrap this.. and this.. It ended with me beginning a big revamp of my whole "engine", or rather collection of stuff - nothing inherently wrong as it was badly needed - but nothing happened with my exe file! It was still almost 2mb big with basically only a hello world...
Then it struck me! I had been using -g with gcc and without any optimizing at all. When I turned on size and speed optimizations and scrapped the debugging the change was quite extraordinary.
The mutant 14 637 kb was magically transformed to a more fitting ant size of 856 kb. I couldn't save much of the total file size (23 254 kb -> 20 768 kb) so while I apologize for hogging your bandwidth, time and harddrive space I'm hoping you won't be too mad at me.
Posted by Jonas Hietala 17:39:55 in Random
No comments yet :(

Subscribe