How to proper scale game up/down for Android?

Guzzz

  • *
  • Posts: 496
So, I finally can deploy onto Android :D hurray!
At this moment I have a couple of problems, and I hope you can help me to tackle them.

1. I built the game mainly for iPhone and on my iPhone 7 it runs great! FPS rarely drops below 45. It never crashes. Everything is great! With my recently acquired (used) Samsung  S5 neo everything isn't that great. Sometimes FPS goes lower 5 and almost crashes. I looked into specs and found that the only difference between the two that makes iPhone 7 better is it has CPU 2.34 GHz when Samsung S5 neo has only 1.6 GHz. In the rest of the specs Samsung is much better. So, I guess it's just my bad, I shouldn't have bought neo version. Standard Samsung S5 has proper 2.5 GHz. I just didn't expect to see such low performance with 1.6 GHz.

2.  My game is 750x1334px screen size with 1x, 1.5x and 2x scale available. Despite all of these and checked boxes against Android 1.5x and 2x in Display/Mobile settings on Samsung according Log Viewer only 1x is loaded
Quote
Universal.hx:356: Scale Y: 1.44
Universal.hx:355: Scale X: 1.44
Universal.hx:354: Logical Height: 1334
Universal.hx:353: Logical Width: 750
Universal.hx:251: Asset Scale: 1x
Universal.hx:250: Theoretical Scale: 1
Universal.hx:146: Scale Mode: SCALE_TO_FIT_FILL
Universal.hx:145: Enabled Scales: [1x,1.5x,2x]
Moreover from time to time the game is loaded with black space at the top or at the bottom, and sometimes without them (regardless whether it's Scale to Fit (Fill) or Scale to Fit (Full Screen).
I tried to force the game to load 2x scale but Stencyl didn't even want to compile with this block (set scale mode to). So I lust don't know how to use it. Maybe there is a way to change Screen Size and Game Size via code within the game? My game has quite adaptive UI so it wont hurt the game, especially when the game is cutting screen at the bottom.

3. Admob doesn't work yet. I guess I just need to wait, because on iPhone it works so should here as well.

« Last Edit: October 05, 2019, 10:33:26 am by Guzzz »
Watch my new game http://www.hitandcrash.com based on my comic strip https://www.instagram.com/hitandcrash

HeadlessD is my dungeon-crawling game on iOs and Android. Made in Stencyl. https://www.headlessd.com/

Guzzz

  • *
  • Posts: 496
I've finally found how to scale Android with 1.5x scale. Bad news is it almost instantly crashes  :(

p.s. AdMob at least test version is working fine.
Watch my new game http://www.hitandcrash.com based on my comic strip https://www.instagram.com/hitandcrash

HeadlessD is my dungeon-crawling game on iOs and Android. Made in Stencyl. https://www.headlessd.com/