07-31-2012 10:28 AM - edited 07-31-2012 11:22 AM
We work on a text based game which is packaged as a webworks app for the BlackBerry platform.
During the last update we encountered the maximum COD [size/count] limit which meant our app would not load onto a device.
We already use extremely stripped down and compressed assets as well as lower quality images compared to Android and iOS.
From what I've read, the maximum size of an app is 14mb, but this would be with a perfect 50/50 split of application code versus assets. Since our app is pretty much 100% assets its annoying that we can't load more than about 6.9mb without it being rejected by the phone.
From my research already, the responses to this seem to be "tough" or "load it remotely from a server". Given how much BlackBerry is pushing webworks development I'm surprised there is no way around this for packaged apps. We don't really want to load our assets in remotely because in order to make a difference in file size, the ones we choose to load would need to be on the large, and we don't want to use people's bandwidth up loading images over and over, or suffer any sort of network delay that would affect the game look and feel - thats why we've made an app, afterall.
I guess what I'm asking is, is there any way to make use of the unused application space we'd be using if we were a native app, or if not, is there any alternative solution that isn't going to need us to use up client bandwidth.
07-31-2012 11:10 AM - edited 07-31-2012 11:16 AM
I'm sorry about the loss of formatting and line breaks but the BlackBerry forums won't work correctly; pressing the post button after editing warns me I'm going to lose my changes if I continue, and fails. /shrug.
Edit: Must be a Chrome thing, I've fixed it in Firefox.
07-31-2012 01:47 PM
Unfortunately there is no way to leverage the unused application space for your resource. This size limitation is a BlackBerry application limitation, not just a WebWorks application. Perhaps best it is described here:
The best approach here, as you've referenced, would be to download the resources OTA during an initial, one-time configuration on startup. Basically, the user either downloads the resources with the application, or the user downloads the application, then the resources. The overall imapct on bandwidth shouldn't really be that different since the user needs to get those resources one way or another.
Once downloaded, you could then save those resources to the filesystem, and reference them there as needed. So the very first time there may be a bit of a delay as the application updates itself, but from there on out it would simply re-use the resources it already has.
07-31-2012 02:02 PM
Thanks for your reply!
This size limitation is a BlackBerry application limitation, not just a WebWorks application.
I realise this, I was hoping that since WebWorks applications are by their nature resource heavy and native code light, there would be some sort of way for them to get around the restriction of:
64 KB for application data (compiled code) and 64 KB for resource data. (For example, images and files.)
Your suggestion to download the assets to the file system on a one time basis sounds like the way to go. I assume we can just use the WebWorks IO API for this?
We've managed to shave off the required kilobytes for this release so I'll look into implementing what you've outlined in the next one.
07-31-2012 02:31 PM
You've got it. The blackberry.io.* APIs are the way to go for access to the filesystem on BBOS. Let us know if you hit any issues in the implementation.