gdx-gamesvcs | Easy integration of gameservices in your libGDX game | Game Engine library

 by   MrStahlfelge Java Version: v1.1.0 License: Apache-2.0

kandi X-RAY | gdx-gamesvcs Summary

gdx-gamesvcs is a Java library typically used in Gaming, Game Engine applications. gdx-gamesvcs has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.
Easy integration of gameservices in your libGDX game: Google Play Games, Apple Game Center, Amazon GameCircle and more
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        gdx-gamesvcs has a low active ecosystem.
                        summary
                        It has 95 star(s) with 14 fork(s). There are 13 watchers for this library.
                        summary
                        It had no major release in the last 12 months.
                        summary
                        There are 1 open issues and 34 have been closed. On average issues are closed in 123 days. There are no pull requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of gdx-gamesvcs is v1.1.0
                        gdx-gamesvcs Support
                          Best in #Game Engine
                            Average in #Game Engine
                            gdx-gamesvcs Support
                              Best in #Game Engine
                                Average in #Game Engine

                                  kandi-Quality Quality

                                    summary
                                    gdx-gamesvcs has 0 bugs and 0 code smells.
                                    gdx-gamesvcs Quality
                                      Best in #Game Engine
                                        Average in #Game Engine
                                        gdx-gamesvcs Quality
                                          Best in #Game Engine
                                            Average in #Game Engine

                                              kandi-Security Security

                                                summary
                                                gdx-gamesvcs has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                gdx-gamesvcs code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                gdx-gamesvcs Security
                                                  Best in #Game Engine
                                                    Average in #Game Engine
                                                    gdx-gamesvcs Security
                                                      Best in #Game Engine
                                                        Average in #Game Engine

                                                          kandi-License License

                                                            summary
                                                            gdx-gamesvcs is licensed under the Apache-2.0 License. This license is Permissive.
                                                            summary
                                                            Permissive licenses have the least restrictions, and you can use them in most projects.
                                                            gdx-gamesvcs License
                                                              Best in #Game Engine
                                                                Average in #Game Engine
                                                                gdx-gamesvcs License
                                                                  Best in #Game Engine
                                                                    Average in #Game Engine

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        gdx-gamesvcs releases are available to install and integrate.
                                                                        summary
                                                                        Deployable package is available in Maven.
                                                                        summary
                                                                        Build file is available. You can build the component from source.
                                                                        summary
                                                                        Installation instructions, examples and code snippets are available.
                                                                        summary
                                                                        It has 6926 lines of code, 511 functions and 56 files.
                                                                        summary
                                                                        It has high code complexity. Code complexity directly impacts maintainability of the code.
                                                                        gdx-gamesvcs Reuse
                                                                          Best in #Game Engine
                                                                            Average in #Game Engine
                                                                            gdx-gamesvcs Reuse
                                                                              Best in #Game Engine
                                                                                Average in #Game Engine
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi has reviewed gdx-gamesvcs and discovered the below as its top functions. This is intended to give you an instant insight into gdx-gamesvcs implemented functionality, and help decide if they suit your requirements.
                                                                                  • Records the events
                                                                                    • Called when the game service is ready .
                                                                                      • Resolve a connection failure
                                                                                        • Build the request for the GIS service .
                                                                                          • Authorizes the Google Analytics application .
                                                                                            • Loads player information from game server .
                                                                                              • Creates a GjScoreboardEntry from a JSON value .
                                                                                                • Downloads the contents of a URL .
                                                                                                  • Build query stat request .
                                                                                                    • Get an array of ListenerBoardBoardEntry objects .
                                                                                                      Get all kandi verified functions for this library.
                                                                                                      Get all kandi verified functions for this library.

                                                                                                      gdx-gamesvcs Key Features

                                                                                                      Easy integration of gameservices in your libGDX game: Google Play Games, Apple Game Center, Amazon GameCircle and more

                                                                                                      gdx-gamesvcs Examples and Code Snippets

                                                                                                      No Code Snippets are available at this moment for gdx-gamesvcs.
                                                                                                      Community Discussions

                                                                                                      Trending Discussions on gdx-gamesvcs

                                                                                                      How to save game data to the cloud using gdx-gamesvcs?
                                                                                                      chevron right

                                                                                                      Trending Discussions on gdx-gamesvcs

                                                                                                      QUESTION

                                                                                                      How to save game data to the cloud using gdx-gamesvcs?
                                                                                                      Asked 2020-Aug-22 at 06:19

                                                                                                      I want to implement Google Play Games Services in my game on the libgdx engine. I tried using gdx-gamesvcs for this. But I am having trouble saving data. I understood from the example that one value is being saved, not the entire state of the game. So I decided to check it out: save and load one value using gsClient.loadGameState and gsClient.saveGameState. I deliberately deleted the game data from the device. But as a result, not only the test value changed, but many others as well. I thought that the state of the entire game is being saved, but the values ​​obtained do not fit into the logic of the game and could not be obtained in it. How should I use this tool and is it worth it at all, or is it better to use what libgdx itself offers? Here is a piece of code:

                                                                                                      if (gsClient.isSessionActive()) {
                                                                                                                  try {
                                                                                                                      gsClient.saveGameState("data", intToByteArray(testValue), 0, null);
                                                                                                                  } catch (UnsupportedOperationException unsupportedOperationException) {
                                                                                                      }
                                                                                                      
                                                                                                      
                                                                                                      if (gsClient.isSessionActive()) {
                                                                                                                  try {
                                                                                                                      gsClient.loadGameState("data", new ILoadGameStateResponseListener() {
                                                                                                                          @Override
                                                                                                                          public void gsGameStateLoaded(byte[] gameState) {
                                                                                                                              if (gameState != null) {
                                                                                                                                  setTestValue(bytesToInt(gameState));
                                                                                                                              }
                                                                                                                          }
                                                                                                                      });
                                                                                                                  } catch (UnsupportedOperationException unsupportedOperationException) {
                                                                                                                  }
                                                                                                      }
                                                                                                      

                                                                                                      UPD Yes, saving occurs both to the cloud and to the device, for saving to the device I use Preferences. I have a Google account login button in the game, it works, I have repeatedly seen this standard bar of my account level, which appears at the top when I log in. Everything is set up in the developer console too, I have an id for achievements and leaderboards. In code, I work with the client like this (In the create() method):

                                                                                                      public IGameServiceClient gsClient;
                                                                                                      
                                                                                                      if (gsClient == null) {
                                                                                                      
                                                                                                                  gsClient = new MockGameServiceClient(1) {
                                                                                                                      @Override
                                                                                                                      protected Array getLeaderboardEntries() {
                                                                                                                          return null;
                                                                                                                      }
                                                                                                      
                                                                                                                      @Override
                                                                                                                      protected Array getGameStates() {
                                                                                                                          return null;
                                                                                                                      }
                                                                                                      
                                                                                                                      @Override
                                                                                                                      protected byte[] getGameState() {
                                                                                                                          return new byte[0];
                                                                                                                      }
                                                                                                      
                                                                                                                      @Override
                                                                                                                      protected Array getAchievements() {
                                                                                                                          return null;
                                                                                                                      }
                                                                                                      
                                                                                                                      @Override
                                                                                                                      protected String getPlayerName() {
                                                                                                                          return null;
                                                                                                                      }
                                                                                                                  };
                                                                                                              }
                                                                                                              gsClient.setListener(this);
                                                                                                              gsClient.resumeSession();
                                                                                                      

                                                                                                      Next is loading.
                                                                                                      The exception is not caught, I removed it and everything works as before.

                                                                                                      ANSWER

                                                                                                      Answered 2020-Aug-20 at 19:56

                                                                                                      Well, libgdx offers no built-in cloud-save, it is hard to use it for that. :-)

                                                                                                      You should in any case save to local AND to cloud, as the cloud is not very fast to load its state.

                                                                                                      I can see no problem in your code besides the fact that you swallow an UnsupportedOperationException that is thrown if you did not activate cloud save feature. So the interesting question is: what happens if you don't swallow the exception, and did you intialize GpgsClient with cloud save enabled? Are you really logged in to Gpgs, and is the feature also activated in your developer console?

                                                                                                      Source https://stackoverflow.com/questions/63511274

                                                                                                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                                      Vulnerabilities

                                                                                                      No vulnerabilities reported

                                                                                                      Install gdx-gamesvcs

                                                                                                      This project is published to the Sonatype Maven repository. You can integrate the lib into your project by just adding the dependencies to your build.gradle file.

                                                                                                      Support

                                                                                                      Google Play Games (Android, Desktop, HTML5)Apple Game Center (iOS RoboVM)GameJolt (all platforms)Huawei Game Service (Android, since 1.1.0)Amazon GameCircle (Android)Kongregate (HTML5)
                                                                                                      Find more information at:
                                                                                                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                                      Find more libraries
                                                                                                      Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                                      Save this library and start creating your kit
                                                                                                      CLONE
                                                                                                    • HTTPS

                                                                                                      https://github.com/MrStahlfelge/gdx-gamesvcs.git

                                                                                                    • CLI

                                                                                                      gh repo clone MrStahlfelge/gdx-gamesvcs

                                                                                                    • sshUrl

                                                                                                      git@github.com:MrStahlfelge/gdx-gamesvcs.git

                                                                                                    • Share this Page

                                                                                                      share link

                                                                                                      Explore Related Topics

                                                                                                      Consider Popular Game Engine Libraries

                                                                                                      godot

                                                                                                      by godotengine

                                                                                                      phaser

                                                                                                      by photonstorm

                                                                                                      libgdx

                                                                                                      by libgdx

                                                                                                      aseprite

                                                                                                      by aseprite

                                                                                                      Babylon.js

                                                                                                      by BabylonJS

                                                                                                      Try Top Libraries by MrStahlfelge

                                                                                                      gdx-controllerutils

                                                                                                      by MrStahlfelgeJava

                                                                                                      lightblocks

                                                                                                      by MrStahlfelgeJava

                                                                                                      gdx-gameanalytics

                                                                                                      by MrStahlfelgeJava

                                                                                                      gdx-websockets

                                                                                                      by MrStahlfelgeJava

                                                                                                      gdx-pushmessages

                                                                                                      by MrStahlfelgeJava

                                                                                                      Compare Game Engine Libraries with Highest Support

                                                                                                      godot

                                                                                                      by godotengine

                                                                                                      Cataclysm-DDA

                                                                                                      by CleverRaven

                                                                                                      libgdx

                                                                                                      by libgdx

                                                                                                      phaser

                                                                                                      by photonstorm

                                                                                                      Mindustry

                                                                                                      by Anuken

                                                                                                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                                      Find more libraries
                                                                                                      Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                                      Save this library and start creating your kit