kandi background
Explore Kits

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

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

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

Download this library from

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
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • gdx-gamesvcs has a low active ecosystem.
  • It has 95 star(s) with 14 fork(s). There are 13 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 1 open issues and 34 have been closed. On average issues are closed in 123 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • 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

quality kandi Quality

  • 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

securitySecurity

  • gdx-gamesvcs has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • gdx-gamesvcs code analysis shows 0 unresolved vulnerabilities.
  • 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

license License

  • gdx-gamesvcs is licensed under the Apache-2.0 License. This license is Permissive.
  • 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

buildReuse

  • gdx-gamesvcs releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • It has 6926 lines of code, 511 functions and 56 files.
  • 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

                      Installation

                      copy iconCopydownload iconDownload
                      gdxVersion = '1.9.8'
                      gamesvcsVersion = '1.1.0'
                      

                      Building from source

                      copy iconCopydownload iconDownload
                      gradlew clean uploadArchives -PLOCAL=true
                      

                      Initializing the game service client

                      copy iconCopydownload iconDownload
                      public IGameServiceClient gsClient;
                      
                      @Override
                      public void create() {
                          // ...awesome initialization code...
                          
                          if (gsClient == null)
                              gsClient = new NoGameServiceClient();
                      
                          // for getting callbacks from the client
                          gsClient.setListener(this);
                      
                          // establish a connection to the game service without error messages or login screens
                          gsClient.resumeSession();
                          
                      }
                      
                      @Override
                      public void pause() {
                          super.pause();
                      
                          gsClient.pauseSession();
                      }
                      
                      @Override
                      public void resume() {
                          super.resume();
                      
                          gsClient.resumeSession();
                      }
                      

                      Submitting events and scores, unlocking achievements

                      copy iconCopydownload iconDownload
                      gsClient.submitToLeaderboard(leaderboardId, score, tag);
                      
                      gsClient.unlockAchievement(achievementId);
                      

                      Cloud save

                      copy iconCopydownload iconDownload
                      if (gsClient.isFeatureSupported(GameServiceFeature.GameStateStorage))
                      

                      Fetching scores and achievement status

                      copy iconCopydownload iconDownload
                      gsClient.providesAchievementsUI();
                      gsClient.showAchievements();
                      // same for leaderboards
                      

                      Community Discussions

                      Trending Discussions on gdx-gamesvcs
                      • How to save game data to the cloud using gdx-gamesvcs?
                      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<ILeaderBoardEntry> getLeaderboardEntries() {
                                          return null;
                                      }
                      
                                      @Override
                                      protected Array<String> getGameStates() {
                                          return null;
                                      }
                      
                                      @Override
                                      protected byte[] getGameState() {
                                          return new byte[0];
                                      }
                      
                                      @Override
                                      protected Array<IAchievement> 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)

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Explore Related Topics

                      Share this Page

                      share link
                      Consider Popular Game Engine Libraries
                      Try Top Libraries by MrStahlfelge
                      Compare Game Engine Libraries with Highest Support
                      Compare Game Engine Libraries with Highest Quality
                      Compare Game Engine Libraries with Highest Security
                      Compare Game Engine Libraries with Permissive License
                      Compare Game Engine Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.