Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › Game restarts (~30% times) when lost focus

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #5905

    Raimonds

    Hi,

    My problem is that game is not stable when it goes in background (open url/play.google application, phone call, etc). I don’t know why is this happening. I have no other test devices (only my samsung galaxy pocket and one HTC).

    When it comes back it “Restarts”.

    If i only have this kind of issue?

     

    Best Regards,

    Raimonds

     

    #5906

    Alex
    Felgo Team

    Hi Raimonds,

    this issue only occurs on low end devices with little RAM. When you leave your application to do other stuff, other applications might be forced to use the RAM needed by your game. This causes the game to be shut down, resulting in a restart when re-entering.

    Unless you can lower the memory usage of your game, there is not really much that you can do, at least no with small effort. Things like saving your exact game state when the application goes into background in the database and recreating that state on resume, is clearly an overkill in my opinion, since it happens only to low end devices.

    Best Regards,
    Alex

    #5907

    Raimonds

    Hi Alex,

    one object that you do not recommend to use is Rectangle – is there any more objects with bad performance? How can “lower the memory usage of your game”?

     

    Best Regards,

    Raimonds

    not

    #5908

    Alex
    Felgo Team

    Use MultiResolutionImages to load smaller images on devices with smaller screens (and also most likely less memory).

    Use the Loader item to load Scenes dynamically, this way you only have your current Scene in the memory (e.g. while playing, you don’t need your main menu scene).

    These are the most important things coming to my mind, that apply to any game.

    Best Regards,
    Alex

    #5909

    Alex
    Felgo Team

    If you need an example usage of the Loader, have a look at Squaby (very complex though) or VZombieBreak where only the different levels are loaded dynamically (very easy). I will also prepare a new version of the MultiSceneMultiLevel Demo with dynamically loading and loading-screens soon.

    Let me know if you need any further help.

    #5910

    Martin

    Looking forward to the updated tutorial since dynamically loaded scenes are on our todo list. Btw, is it possible to have a non-static splash-screen while loading takes place?

    Cheers, Martin

    #5911

    Alex
    Felgo Team

    Hi Martin,

    with our current renderer this is not possible. While the Loader item is busy, the last visible frame will be displayed until the Loader finishes. This is the reason we are displaying the loading screen, add a little delay to be sure the loading screen is fully visible, and then change the loader source to load the new scene.

    However it will be possible once we switch to the new Qt renderer.

    Cheers,
    Alex

    #5914

    Alex
    Felgo Team

    Here’s the download link for the new MultiSceneMultiLevel demo, containing all the files within the “qml” folder, exclusive for you guys. It will be officially added with the next daily build.

    It features dynamically loading of scenes and levels and loading scenes. If you have any questions, I’m here for you 😉

    Cheers,
    Alex

    #5915

    Martin

    Thanks Alex! Very nice, indeed.

    Best,

    Martin

    #5927

    Raimonds

    Thanks Alex! Very helpful example!

     

    Best Regards,

    Raimonds

Viewing 10 posts - 1 through 10 (of 10 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded