Sign in to follow this  

Resources vs. flat files

This topic is 4858 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'm looking at how I can store my assets, and it seems I'm left choosing between using a resource file (with the assets as binary resources) and storing assets in the module directory as individual files. I'm getting the impression that I should only be using the resource file for small data pieces, particularly ones that need localization, but I'd like to hear it from someone who has more than my two hours of experience with this thing [grin] Also, I saw the memory constraint on the contest page - is there a total size constraint (i.e. the size of the module on disk)? I'd imagine that you won't want us submitting games with a couple of hundred meg of assets...

Share this post


Link to post
Share on other sites
Typically you should try to keep the number of files on the phone as small as possible. This is because these phones actually do have a limit to the number of files in their file system. (You can have like 200 files fill up the phone but it can say it has like 1 meg free space.) I'm not sure what Dave wants exactly, but in practice you should try to keep it all in one bar file.

Also, I'd imagine that that 1M limit is probably Mod+Bar.

The good news is that the Arm compiler is good at optimizing the code. So if you have some HUGE code, it should take up maybe 300k. So that gives you 700k of assets to work with. Dave, are you going to use thumb mode? (I'm assuming no GCC...)

-=Lohrno

[Edited by - Lohrno on August 28, 2004 3:36:00 PM]

Share this post


Link to post
Share on other sites
OK; I guess I'm asking for numbers to plug into the MIF file (EFS Restrictions for Max Files and Max Space, on the General tab).

Is the whole resource file loaded into memory at app startup, then? That's what I'm really asking... I can put language-specific and global assets into the resource file, and keep everything else in external files, if that's the case.

Share this post


Link to post
Share on other sites
It's not all loaded at startup, and you can load and unload bits and pieces at any time. I think it's just a way of keeping the number of files actually on the phone down, as well as not bogging down the network with separate file requests. It's definitely fast enough to load all your assets from the bar as opposed to from file system, and it's better to have them all in the same file so you're not eating up slots in the file system. My reccomendation: put everything in one bar.

Here's another hint: In the emulator it does say the free memory at the bottom, but if you hit ###3, you can see the free memory. It's just kind of easier to read.

Hmm I've never touched the Max Files and Max Space EFS restrictions though...

-=Lohrno

[Edited by - Lohrno on August 29, 2004 3:54:12 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this