If you were holding your breath for the Android release... stop.
Shogun_Named_Marcus
Member Posts: 13
"We've hit a snag with BG resource handling and ship panel APK files. We're going to be a while yet on Android. "
So, this is even more frustrating than no update on where we stand with an Android release. I can understand a reticence to come forward with a concrete release date after the first delay fiasco, but announcing further problems with the Android version in such an uninformative way seems a bit baffling to me.
So, this is even more frustrating than no update on where we stand with an Android release. I can understand a reticence to come forward with a concrete release date after the first delay fiasco, but announcing further problems with the Android version in such an uninformative way seems a bit baffling to me.
0
Comments
Trent Oster @TrentOster
@roblef BG does some direct memcopy to structs in file access. To access .zip files properly we need to add the decompression into the read
This is much more informative, the BG codebase isn't prepared for Android (obviously, it's from '98)... it's not an Overhaul fault
For example, when publishing an android app, Google imposes that it MUST be less than 50 MB... a little more than the BG launcher size.
This means that all additional contents have to be downloaded from elsewhere, be it the Beamdog site or the Google cloud.
Downloading something of the size of Baldur's Gate can scare many peoples, then I suppose they zipped the game data to save space and size.
What I don't really understand is why they discovered this only now... sounds a little late in the project time
By the way, don't worry, I rarely ignore peoples
In another tweet, Trent mentioned that it will take'weeks'. And that happened few days ago=more than a month after the game's release.
Correct me, if I'm wrong but isn't Apple's iOS also a linux-based system, just like Android? Why didn't the iOS release have similar problems?
TL;DR- unhappy with the delays, but still buying it as soon as it hits GooglePlay.
iOS is based on BSD, Android on Linux, very similar indeed but not identical.
iOS apps can be made as a solid BIG archive, Android apps bigger than 50 megs uses Expansions (see below)... that's why (probably) iOS does not need zips and Android does.
@smartroad
Please, think twice before screaming out inaccurate information based only on your phone experience:
http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113469
"APK file: maximum supported size for a single .apk is 50MB. You can use expansion files to upload additional assets such as graphics."
And:
http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=2481797
"Small applications that download quickly generally give the best user experiences. However, if your application requires more than 50MB of space, you can use expansion files to store additional APK assets. We will store two files (in addition to the original 50MB) of data per application at no additional cost. The maximum file size for each of these two files is 2GB, but it’s better to make those files as small as possible for the best user experience."
@Psiven
Yes, sure, it's their task to do such update, the zip problem is one of the things they have to fix to complete it.
Seems it's their workaround for the rules you've cited.
I'd say a development cycle close to 1 year is to be expected, mainly now that they came to the conclusion they'll have to change the way the game reads/writes files to cope with zipped apk extensions.
The same applies to the Linux version that was approved late in December and, AFAIK, isn't even in development yet.
UNLESS...
Unless they are trying to change the whole "structure"...making all those bam, bif, bcs or whatever compressed. Is it really a good way? Load time, specific bugs and maintenence...Not to mention that it might not be that helpful in making the size small.
I don't know then. But I think it's hardly LINUX's fault. It's at most ANDROID's fault. Or Google's fault. Maybe Java's fault. Java is never something good, is it? :P
Let's start with some suppositions:
1) they used zip files because Google Play admit only one additional file of 2 GB max
2) they does not uncompress it because this whould require more than double the space while installing
- download (2gb)
- unzip: 2gb + the uncompressed for example 2.5gb: 4.5gb in the middle of the installation process, way too much!
- delete the zip, leave with the 2.5gb uncompressed
So the only option is reading directly the zip file.
Here is the very technical part...
Trent nominated the memcpy function (it's not a typo, it's really called this way: http://www.kernel.org/doc/man-pages/online/pages/man3/memcpy.3.html) which does copy an array of bytes to a memory mapped structure.
Take the TLK file for a simple example... this is the header structure (http://www.ugcs.caltech.edu/~jedwin/baldur_TLK.html)
TLK V1 Header Offset Size (datatype) Description 0x0000 4 (char array) Signature ('TLK ') 0x0004 4 (char array) Version ('V1 ') 0x0008 2 (word) unknown (always 0?) 0x000a 4 (dword) Number of Strref entries in this file. 0x000e 4 (dword) Offset to string data
Baldur's Gate just expects to be able to read 18 bytes and map them to this structure directly in the above structure.
This can't be done with a zipped file, because it has first to be uncompressed on the fly and then read like a stream, so a little (?) adaptation of the code base is necessary.
at the end it's not a Linux, Android or Java fault (btw, BG is written in C++/C)... it's simply made without zip files in mind
PS: Java rocks, but C rocks even more !!
no, I think it's a very fine grained change, it can be solved quickly... and it will have (if any) a minimal impact only on loading times, never on gameplay and overall speed.
@Kubus
by quickly reading this page (http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=2481797) seems that a sort of incremental patching is supported by using the second zipped file, but I never tried that... however it sounds limited yes, I know, but there is no way to do a memcpy in java anyway, since BG is written in a mix of C and C++, I bet on the Android part to be limited to setting up the GL context and driving touch inputs, nothing else.
I also love Java.... but C is part of my life
The only points are the time for developing a update service, and the network resources they could provide on their own. Now I don't even see they seed the official torrent. Not sure if if any port already have incremental update service, nor the installer is making use of any http download. It should be two, right? Which shouldn't be a problem to BGEE or further possible EEs.
I think the main reason is the capacity issue. But I would only agree that if they would support older models of tablets (and phones?) which are without SD card slot.
I seldom found what is written in Java is good. Android is probably the best already but I still thought it's kind of hindered by Java. It LOOKS crappy. Before it went open source it SEEMS to be the crappiest crap. In my opinion. So ignore it, no intentional harm :P
EDIT: Although it might be easier / more efficient to replace the memcpy altogether. ---> Depends on how you have been "raised" To my mind, a surprising amount of people write horrific C++ code. #IFDEF me to oblivion... And C provides WAY too many security flaws, especially when used in a "MUST... MEET... DEADLINE..." manner
yes, they're two, the second seems to be used only as a sort of patching system, but it's rather obscure to me
@Kubus
all true, but they can't translate the entire BG codebase to java to use InputStreams and then call the native memcpy
I prefer they try to keep an unified and portable base across all the platforms and keep it solid, even if this could take much more time to get our Android release...
IMHO, all languages are valid and have their pros and cons... usually the flaw is between the chair and the keyboard
BTW, C has the #define Hell... java has the dependency Inferno... see Maven !!
Oh and ofc all languages have their place and purpose, but I still like a bit of trash-talk when C is mentioned
When working with Java (99% of my time) I love its simplicity... but with C, I feel the Power !
Perhaps you could have simply state that I was referring to the whole application and that the 2GB is split between 50MB for the APK and the rest is for data only - rather then insulting me and accusing me of 'screaming'.
I do honestly thank you however for updating me as to how the system works - the information you provided is quite interesting.
I'm sorry, I never intended to insult you.
I just didn't like the way you stated "That changed ages ago. I just downloaded a game that was near 2GB in size direct from Google Play" as an absolute without any reference.
As you know, forums posts do not pass along emotional information nor user experience backgrounds, so next time, please, prefix it with "From my point of view..." or something like that.
Cheers
Normally I do start with an "As I understand..." etc. as it is a get out clause if I am mistaken!! Not sure why I didn't for that post. :-S
The internet is not what it used to be...
On the other hand -any thread slowly being diverted to a talk about programming languages? Yup. Good old internet...