Games [XUI2D] Ilans first App - Freeze on Tablet (Android)

Discussion in 'Game Development' started by JanG, Sep 7, 2018.

  1. JanG

    JanG Member Licensed User

    Ilans first app runs quite good on almost all my android devices.

    Phones (2 tested):
    When the screensaver (black screen) comes, after switch on the screen again the game starts newly again. You can't continue.

    After switching on the screen again the game is frozen at the same position where it ended when screen was going black.

    It's really fun to test this kind of apps. I think there is a lot potential for many of us!
    ilan likes this.
  2. moster67

    moster67 Expert Licensed User

    I am not into game developing but when you mention 2 tested phones and one tablet, you really ought to mention what devices they are, their specs, their OS-version. I can't compare your tests with perhaps my own devices without knowing yours, right? Sorry, but a report like yours is not really useful...
  3. ilan

    ilan Expert Licensed User

    you can keep the phone always alive with:

    Dim awake As PhoneWakeState
    this will prevent the screensaver to freeze the app. anyway, i have not tested it but you could put in Activity_Resume a call to x2.start in the game class. what i think is that when the app is going to background x2.stop is called and what you need to do is call again x2.start. (just a thought i have not investigate it)
  4. JanG

    JanG Member Licensed User

    Thank you for your idea! I tested this, but it doesn't work. In the examples there are 2 types. One uses gm.StartGame/gm.StopGame (e.g. SpaceInvaders/IlansApp/MonsterTruck). This kind of apps start new after sleeping. Your game progress is lost after waking up. The ones ones use gm.X2.Start/gm.X2.Stop (e.g. WalkingCharacter/Lines). These apps resume at the state they were stopped. But you can't change it simply by replacing gm.StartGame to gm.X2.Start. This doesn't work and gives strange effects. I think there is a little more to do, but I don't have the time at the moment.

    As I wrote above it is an issue by design. It doesn't depend on the Android-Version. But if you want to know and you need this information for helping me I am very happy:
    Phone: Galaxy A3 (2017), SM-A320FL, Android 8.0.0 (Benchmark Score 3463)
    Tablet: Samsung Galaxy Tab Pro 10.1 (SM-T520), Android 4.4.2 (Benchmark Score 5060)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice