• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Some Cerberus improvements

AntonM

New member
Joined
Aug 16, 2017
Messages
7
After the release of the game on mobile platforms, I have several changes in Сerberus, maybe it will be useful for someone.

iOS
Cerberus on iOS currently caches loaded images, which uses a lot of memory and when images are deleted in the game, the memory is not immediately released. Cached images should be deleted if there is not much memory left in the application and the app receives memory warning messages, but my game simply crashed on older devices due to lack of memory. To load images without caching, replace image = [UIImage imageNamed: path.ToNSString ()]; in iosgame.cpp LoadImageData by this

Objective-C:
        NSString *thePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: path.ToNSString()];
        image = [[UIImage alloc] initWithContentsOfFile:thePath];

I was also unable to fix this error. I do not know if anyone else has similar errors, but it produces a lot of crashes for me. This error occurs on ios 12 and later, and I can't even reproduce it. If only someone could fix it it would be good.

Android
To make the game work without a navigation bar on phones with wide screens.
In androidgame.java added UpdateUI() in onWindowFocusChanged()
Java:
    public void UpdateUI(){
        _view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
                |View.SYSTEM_UI_FLAG_FULLSCREEN
                | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
    }

Also I had this error https://stackoverflow.com/questions/31439228/exception-in-the-androids-code-while-starting-the-app/
Fixed added this in Activity OnCreate()
Java:
        if (getResources() == null) {
            bb_std_lang.error("");
        }

Another bug was in mojo.android.java gxtkAudio StopMusic(), the game crashed in this place for some reason. I can't find a link to it right now, but the solution was to remove music.stop();

I also commented out the accelerometer code in BBAndroidGame.onSensorChanged(), because the accelerometer was not used in the game and generated a lot of ARN errors. In general, the android target works well, in Google Play the Crash Rate is about 0.03% and ARN 0.06%, which I think is very good.
 
I was also unable to fix this error. I do not know if anyone else has similar errors, but it produces a lot of crashes for me. This error occurs on ios 12 and later, and I can't even reproduce it. If only someone could fix it it would be good.
As no one seems to have experienced this problem besides you and you changed the image caching, I get the feeling that your change isn't compatible with the garbage collector. The error your describe means, that ios12 tried to access memory, that is freed already.
Without a small sample project which shows the problem and that we can use to test this, there is not much to luck into.
 
I do not know if anyone has released applications in the app store here to see what errors there are. Because it is better to check on a large number of devices.
 
Oh I would have to look into that. But I have to admit my apps were from 2012-2016 or so, so that's been a while. I haven't checked against later iOS versions actually.
 
Back
Top Bottom