Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

lazork357

64Kb exe? seems impossible...

This topic is 5333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve just seen a FPS in 96 Kb (they say it will be reduced to 64) and I''ve decided I want to do something like that, too. But simply compiling the basecode with MS Visual C++ gives me an exe of more than 70 Kb (or more that 100 with Dev-C++). Any suggestion on how to reduce this? How shall I configure the compiler?

Share this post


Link to post
Share on other sites
Advertisement
There''s always optimize for size, and eliminate inlining.

I don''t know how windows does it, but nix has tools to look at what parts of the file are the biggest.

Share this post


Link to post
Share on other sites
If you want fine control over the size your best bet would be to write the whole thing in ASM, that would be rather hard however. MSVC++ has an option to optimise for size, see what that can do, also look into EXE packers e.g UPX.

To get the size of data stored along with the code in the exe down you have to do everything procedurally. This means that instead of saving say a texture file you save instructions on how to make that texture and then make it when you load up the program from the instructions.

[edited by - Monder on April 14, 2004 6:08:41 PM]

Share this post


Link to post
Share on other sites
quote:
But simply compiling the basecode with MS Visual C++ gives me an exe of more than 70 Kb (or more that 100 with Dev-C++).

Dumping the CRT can sometimes help here, (but you'll have to write all the memory management functions yourself using the underlying Win32 API).

quote:
Any suggestion on how to reduce this?

Generally the only way is to ignore all the lovely constructs that C++ has to offer. Excessive use of templates will have a detrimental effect on size. It's not really necessary to switch into asm, just avoid constructs that generate excess code.

quote:
How shall I configure the compiler?

As mentioned by everyone else, link against everything dynamically, load libraries dynamically, and only fixup the functions you really need. Procedural storage of things is good too - if you've never seen it, farb-rausch's "The Product" and "Candytron" demos (http://www.theproduct.de/) are some of the most fantastic 3D things squashed into a 64K space.

quote:
I've decided I want to do something like that

Good luck

Jans.


[edited by - jansic on April 14, 2004 6:24:14 PM]

Share this post


Link to post
Share on other sites
Don''t forget about procedural texturing! Use them to generate runtime textures for the demo without increasing the initial file size. All textures are generated using math at exe runtime

~Graham

----
while (your_engine >= my_engine)
my_engine++;

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by gwihlidal
Don''t forget about procedural texturing!

No-one is reading previous posts today??

Share this post


Link to post
Share on other sites
I just want to thank all of you.
BTW, I think you should check out the FPS I was talking about (it takes an high end Pc though...).
Here it is.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!