Forums

OverviewFelgo 2 Support (Qt 5) › Very poor performance with gamenetwork

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15909

    Luca

    Hi guys. This the story.

    I have lot of achievements and I rely on these and on the leaderboard user position to calculate a points multiplier (user retention and bla bla bla). So, every match I have a lot of incrementAchievement and reportRelativeScore calls. And therefore I got 2 issues:

    1) the gameNetwork calls are blocking activities, when I do the calls to update the achievements and the points the game freezes, the animations are lagging, and since I have a lot of calls, this lasts various seconds. This can also break the next match, if the user click “again” too early.

    2) since the multiplier for the next match relys on the new leaderbord position and on the achievements unlocked, the multiplier should wait the completing of all the gameNetwork calls. But I don’t have a way to know when they are done (right?).

    So.
    Is there a way to send a single call to the server, something like incrementAllAchievements ({achievement_name: achievement_value, achievement_name2: achievement_value2}) to reduce the calls to the server and the delay time?
    Is there a way to know if there are pending requests and wait for the complete sync, or a callback I can use?
    Other strategies?

     

    Thank you.

    #15913

    Günther
    Felgo Team

    Hi Luca!

    It is only possible to update achievements with separate calls at the moment. Consecutive GameNetwork calls are queued and sent one after another if a request is already in progress.

    Internally, we keep track of ongoing requests to e.g. show a loading animation in the game network views. As a first workaround, you can access the VPlayGameNetworkView::loadingCounter property to check for ongoing requests and only start a new game if all requests are finished:

      VPlayGameNetworkView {
        onLoadingCounterChanged: {
          console.log("ACTIVE VPGN REQUESTS: "+loadingCounter)
        }
      }

    For a better solution, we can also implement additional VPGN features for you with a support package or the included support hours of our paid plans.

    Would this be interesting to you?

     

    Best,
    Günther

    #15924

    Luca

    Hi Günther,
    I didn’t know about VPlayGameNetworkView::loadingCounter.
    I’m going to try the workaround, and if I really can’t go through, I’ll let you know.

    Thank you,
    Luca

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

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support