• 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

Android Resume/Pause Bug

I want to say thanks for all support and patience.

What I will do is divide the 320x200 screen into 256x256 textures, that will do it.
 
This is still something to investigate in.
Andoid is kind of a difficult target with its large amount of different devices and versions.
I tested your example on a much slower phone (S4 Mini) and it was still much faster than on your video but far from smooth.
 
Yes and Android is mess to code for and very fragmented. Try this version on your S4 mini it should work okay.

I also wonder how both Android and ios devices will handle the flag. If anyone have the possibility to try this code example on an iphone or ipad and report what fps and stability they get I would be really grateful (I expect perfect 60 fps and full stability but it's always nice to see actual results).

Cerberus:
Import mojo2

Function Main()
    New MyApp
End

Class MyApp Extends App

    Field gfxCopy:Image[16]
    Field ccanvas:Canvas[16]
    Field counter:Int
    Field angle:Float
    Field canvas:Canvas
    Field x:Float, y:Float
    Field r:Float

    Method OnCreate() 
        canvas = New Canvas()
        canvas.Clear 0,0,0
        counter = 0
        For Local i:Int = 0 To 15
            gfxCopy[i] = New Image(256,256,.0,.0,Image.Managed)
            ccanvas[i] = New Canvas(gfxCopy[i])
            ' gfxCopy[i].SetFlagsMask(Image.Managed)
            ccanvas[i].Clear 0,0,0
        Next
        r = 100
        SetSwapInterval 1
       SetUpdateRate 0
    End

    Method OnUpdate()
        angle = angle + 2
    End

    Method OnRender()
        ' ccanvas[counter].PushMatrix
        x = Cos(angle) * r + 256 / 2
        y = Sin(angle) * r + 256 / 2
        r = r + 0.1
        ccanvas[counter].SetColor 0,0,1
        ccanvas[counter].DrawCircle x,y,32
        ccanvas[counter].SetColor 1,0,1
        ccanvas[counter].DrawCircle x,y,30
        ccanvas[counter].Flush
         ' ccanvas[counter].PopMatrix
         ' canvas.PushMatrix
         canvas.Clear
         canvas.DrawImage gfxCopy[counter],0,0
         canvas.Flush
         ' canvas.PopMatrix
         counter = counter + 1
         If counter = 16 Then counter = 0 
    End

End Class
 
Last edited:
On mobile in general you better stay with Power of 2 textures sizes and as small as possible. Especially with old devices like yours. Judging from googling about your Phone and OpenGL ES 2 problems, I found a few post that indicate that it wasn't implemented completely and/or with errors.
The device fragmentation in the Android eco system is nuts. You will find your program running fine on devices you test on and then comes the next user and rates your app down because it won't run his crappy chinese cheap hardware.
 
Back
Top Bottom