• 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 program tiny

oddchild

New member
Joined
Jul 18, 2017
Messages
24
Hi Guys,


I put this up on monkey but figured it would get read here quicker. I have a game that I have been working on. It runs fine on my tablet and phone but on other (Chinese) devices it seems to show up real small.



Any ideas? Do I need a declaration?

Do I need to make two apks for phone models.
 
What screen does this device have? I am not an Android expert, but maybe you need to alter the AndroidManifest.xml file in the target or your project to support large screensizes. There is tons of info when you google about supporting screensizes in Android.

Maybe this will help:

XML:
<supports-screens android:xlargeScreens="true" />

I got this from here:

https://developer.android.com/guide/practices/screens_support.html

Hope it helps.
 
Could you go more into detail please? What means "small"?

As different devices have different resolutions just a standard DrawText "Hello" would result in different sizes for different devices. For an old 800x480px resolution it would look ok, but on a high resolution tablet with more than 2500x15xx pixels it would look very small. That's why usually a virtual resolution is used. That way it looks equal on all different devices.
 
Hi Guys,



Yeah I suppose it might be older devices that are showing up better. I suppose the chinese gizmos are newer. I will give it a shot with the xml file. Are there any plans to get cerberus to linux as well?
 
All you need is kind of a virtual resolution. Let's assume you have a landscape app, so we will use a fix resolution of 1280x720 in my example. That means that the y resolution is always fixed to 720 pixel, where the x-resolution can float between 960 pixels (for 4:3 aspect ratio like the iPad) up to 1280 pixels (for 16:9 aspect ratio):

Code:
'Inside your game class...
Field _scaleRatio:Float
Field _maxX:Float  'this is your floating x value

Method OnCreate:Int()
  Local resX:Float = Float( DeviceWidth() )
  Local resY:Float = Float( DeviceHeight() )
  _scaleRatio = resY / 720.0
  _maxX = resX / _scaleRatio
  Return 0
End Method

Method OnRender:Int()
  'Here happens the "magic" of virtual resolution:
  PushMatrix()
    Scale( _scaleRatio, _scaleRatio )
    'Do your render stuff here...
  PopMatrix()
  Return 0
End Method

There will be a Linux version of Cerberus soon. :)
 
Hi thanks for your input!!!


Right now the game is showing up as a black screen when I attempt to compile to html. I haven't had a chance to see if it will react differently on my android devices yet.


hariflar.png





This is what it looks like on my phone and older android devices. Newer devices make the buttons quite small so that when someone is trying to push them they hit the nearby button because they are so small and hard to hit.


It is a program to teach Syrian refugees how to read...
 
With this code mi images are not where i expect them to be giving problems when trying to pick an image.
How do i use the _scaleratio in the code below?
Code:
For Local piece:Piece = Eachin pieceList
     If (MouseX() > piece.currX) And (MouseX() < (piece.currX+(piece.image.Width)))
          If (MouseY() > piece.currY) And (MouseY() < (piece.currY+(piece.image.Height)))


          Endif
     Endif
Next
 
Did you set the Image.MidHandle flag when you load them? Because then you also have to take this into your calculation.
 
Back
Top Bottom