Size of Ogre3d iPhone applications

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
orochimaster
Gnoblar
Posts: 7
Joined: Tue Feb 09, 2010 7:07 pm

Size of Ogre3d iPhone applications

Post by orochimaster »

Congratulations for the iPhone port!

What's the size of a Simple ogre3d application (release) in KBytes?

For example a scene with a cube?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Size of Ogre3d iPhone applications

Post by masterfalcon »

You know, I haven't tried a basic app recently. But I know that at one time I was able to get the SampleBrowser under 15MB including resources.
orochimaster
Gnoblar
Posts: 7
Joined: Tue Feb 09, 2010 7:07 pm

Re: Size of Ogre3d iPhone applications

Post by orochimaster »

I think 15MB for 3d iphone game applications are a good size.

I saw this "top 10" list, from 2008:
http://www.appleinsider.com/articles/08 ... games.html

There are many games from +-30 to +-50 MB...
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Size of Ogre3d iPhone applications

Post by Zeal »

Awhile ago I thought somebody was talking about striping some of the supported image formats (since all we really need is PVR and MAYBE png). That seems like that would save a fair bit of space no?

Anyone have any other ideas for stuff we could strip out? I agree 15-30meg is no big deal for "real" 3d ganes, but It would be REALLY nice to have a 'minimalistic' build option for simple apps.
_LiVe_
Gnoblar
Posts: 2
Joined: Wed Mar 31, 2010 10:04 pm

Re: Size of Ogre3d iPhone applications

Post by _LiVe_ »

hi everyone!

first i want to say thank you for your work on ogre and the port.

i'm currently researching different 3d engines for the iphone and one of my concerns is the build size of my apps.

i've followed the basic steps to build for the iphone (wiki) which results in a 71.2 MB (release) / 70.9 MB (min size release) sample browser. The package contains 49.7 MB for resources and a 21.4 / 21.2 MB sized executable.

So, i compared the file size of the static libs (i guess i don't need all of them within my apps), and the libOgreMainStatic.a has a file size of 28.7 / 27.7 MB (compared to irrlicht, which has 10.6MB).

When i read that you were able to get the SampleBrowser under 15MB (including resources), i started thinking that i'm doing something terrible wrong :). Are there any tricks to reduce the build size? Normally, i wouldn't mind 30MB, but you know, the over air download limit is currently 20MB, so 15MB for the SampleBrowser could open that door for some apps.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Size of Ogre3d iPhone applications

Post by masterfalcon »

There were several things that I did. The trick was to limit the number of file formats supported in FreeImage along with stripping out anything unnecessary. Use PVR textures. Keep in mind that despite the libraries being that size, a lot of it might be stripped out when you link. It all depends on what features you use.
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10

Re: Size of Ogre3d iPhone applications

Post by DanielSefton »

masterfalcon wrote:The trick was to limit the number of file formats supported in FreeImage along with stripping out anything unnecessary.
Hmm, did you include the stripped down version of freeimage in the iPhone dependencies package?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Size of Ogre3d iPhone applications

Post by masterfalcon »

I don't think so, but I could make it available.
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Re: Size of Ogre3d iPhone applications

Post by syedhs »

Well if you want to know in more precise manner which libraries/functions bloat the size, you can check this utility here: http://codesuppository.blogspot.com/201 ... files.html. And there are another 2-3 good links posted by the visitors.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Size of Ogre3d iPhone applications

Post by masterfalcon »

Only problem with that is that you can't make iPhone apps with Visual Studio.
bstafford
Gnoblar
Posts: 15
Joined: Sat Jan 08, 2011 12:33 am

Re: Size of Ogre3d iPhone applications

Post by bstafford »

We're currently investigating our large executable size as well.

We have a very simple game - a couple of large quads and 6 skinned characters. We're not doing anything fancy.

However, our executable size (*not* including resources) in Release is 17.5 MB. I haven't tried linking against MinSizeRel yet but the library files barely changed in size so I don't expect much of a decrease there.

I suspect that dead-code stripping either isn't working properly (I think I've made the necessary changes to both the Ogre project and mine to enable it), or the linker is just unable to strip very much because it thinks most of the code may end up getting used at runtime.

Has anyone else found the magic bullet to reduce the footprint of Ogre?

Thanks,
Brian
reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Re: Size of Ogre3d iPhone applications

Post by reptor »

I don't code for iPhone but I think stripping FreeImage out completely is a sensible option to take unless you really know that you specifically must use it. I think this is the quickest and easiest way to bring the size down at least on PC.

Personally I just chose one image file format (DDS) and actually with this choice on the PC there is no need for image libraries to go with OGRE at all for just getting your textures displayed on your models.
chubinou
Gnoblar
Posts: 1
Joined: Fri Feb 04, 2011 11:41 am

Re: Size of Ogre3d iPhone applications

Post by chubinou »

Here are few tips I used to reduce the size of my application:

* as suggested by reptor I strip libFreeImage to the strict minimum (I just keeped PNG)
* I remove ogre plugins I didn't require (I keeped none, just the GLES renderer)
* I remove from ogre code code related to stuff I didn't use. A lot of code can't be stripped by default because most managers are loaded during initialisation. OgreRoot.cpp is a good place to start to remove unused components. For instance I remove the FontManager and therefore dependencies upon FreeType
* I disable multithreading and therefore multithreading libraries (actually I was more due to some issues with it)
* I compile for armV7 only, with -Os and -DNDEBUG

By this way I managed to reduce my application from ~40MB to ~12MB
bstafford
Gnoblar
Posts: 15
Joined: Sat Jan 08, 2011 12:33 am

Re: Size of Ogre3d iPhone applications

Post by bstafford »

Thanks for the tips! I'll give them a go.

Brian
digimoz7
Gnoblar
Posts: 1
Joined: Wed Feb 09, 2011 8:50 am

Re: Size of Ogre3d iPhone applications

Post by digimoz7 »

I prefer GIF to PNG for libFreeImage