Android Open Source - RollOverSphere---a-simple-libgdx-game Desktop Runner






From Project

Back to project page RollOverSphere---a-simple-libgdx-game.

License

The source code is released under:

MIT License

If you think the Android project RollOverSphere---a-simple-libgdx-game listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.igorcrevar.rolloverchuck;
// w  w w  . j ava  2s.  co m
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.graphics.Texture.TextureWrap;
import com.badlogic.gdx.tools.imagepacker.TexturePacker2;
import com.badlogic.gdx.tools.imagepacker.TexturePacker2.Settings;

public class DesktopRunner {
  public static void main(String[] arg) {
    int i = 0;
    if (i == 1) {
      createAtlas();
    }
    else if (i == 2) {
      createAtlasWidgets();
    }
    else {
      runGame();
    }
  }
  
  private static void createAtlasWidgets() {
    Settings settings = new Settings();
    settings.minHeight = 512;
    settings.minWidth = 512;
    settings.maxHeight = 512;
    settings.maxWidth = 512;
    settings.paddingY = 2;
    settings.paddingX = 2;
    settings.wrapY = TextureWrap.Repeat;
    TexturePacker2.process(settings, 
        //"D:\\gamepictures\\widgets\\",
        "D:\\gamepictures\\rollover\\widgets",        
        "D:\\MySelf\\Android\\workspacerollover\\RollOverChuck-android\\assets\\atlases", "widgets");
  }
  
  private static void createAtlas() {
    Settings settings = new Settings();
    settings.minHeight = 512;
    settings.minWidth = 512;
    settings.maxHeight = 512;
    settings.maxWidth = 512;
    settings.paddingY = 2;
    settings.paddingX = 2;
    settings.wrapY = TextureWrap.Repeat;
    TexturePacker2.process(settings, 
        "D:\\gamepictures\\rollover\\base",
        "D:\\MySelf\\Android\\workspacerollover\\RollOverChuck-android\\assets\\atlases", "base");
  }
  
  private static void runGame() {
    ApplicationListener gameListener = new GameListener(new IActivityRequestHandler() {      
      @Override
      public void rate() {
        System.out.println("rate");
      }

      @Override
      public void share() {
        System.out.println("share ");
      }

      @Override
      public void showAchievements() {
        System.out.println("showAchievements");
      }

      @Override
      public void showLeaderboard(GameType gameType) {
        System.out.println("showLeaderboards" + gameType.toString());
      }

      @Override
      public boolean getSignedInGPGS() {
        return true;
      }

      @Override
      public void loginGPGS() {
        System.out.println("loginGPGS");
      }

      @Override
      public void setGameManager(GameManager gameManager) {
        System.out.println("setGameManager");
      }

      @Override
      public void confirmDialog(final String txt,
          final IConfirmDialogCallback callback) {
        callback.confirmDialogResult(true);
      }

      @Override
      public void showAd() {
        System.out.println("show ad");
      }

      @Override
      public void updateLeaderboardAndAchievements() {
        System.out.println("updateLeaderboardAndAchievements called");
      }
    });
    
    LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
    cfg.title = "Roll Over Chuck!";
    
    cfg.width = 1280;
    cfg.height = (int)(720.0f / 1280 * cfg.width);
    cfg.height = (int)(480.0f / 800 * cfg.width);
    
      new LwjglApplication(gameListener, cfg);
  }
}




Java Source Code List

com.google.example.games.basegameutils.GameHelperUtils.java
com.google.example.games.basegameutils.GameHelper.java
com.igorcrevar.rolloverchuck.DesktopRunner.java
com.igorcrevar.rolloverchuck.GameConsts.java
com.igorcrevar.rolloverchuck.GameData.java
com.igorcrevar.rolloverchuck.GameListener.java
com.igorcrevar.rolloverchuck.GameManager.java
com.igorcrevar.rolloverchuck.GameType.java
com.igorcrevar.rolloverchuck.IActivityRequestHandler.java
com.igorcrevar.rolloverchuck.ISceneManager.java
com.igorcrevar.rolloverchuck.IScene.java
com.igorcrevar.rolloverchuck.mesh.CubeMeshWithNormals.java
com.igorcrevar.rolloverchuck.mesh.CubeMesh.java
com.igorcrevar.rolloverchuck.mesh.FieldMesh.java
com.igorcrevar.rolloverchuck.mesh.IMesh.java
com.igorcrevar.rolloverchuck.mesh.SphereMesh.java
com.igorcrevar.rolloverchuck.objects.BoxObject.java
com.igorcrevar.rolloverchuck.objects.ChuckObject.java
com.igorcrevar.rolloverchuck.objects.ChuckSpriteObject.java
com.igorcrevar.rolloverchuck.objects.EndGameButtonsObject.java
com.igorcrevar.rolloverchuck.objects.FieldObject.java
com.igorcrevar.rolloverchuck.objects.GameButton.java
com.igorcrevar.rolloverchuck.objects.IntroSceneButtonsObject.java
com.igorcrevar.rolloverchuck.objects.MainWallObject.java
com.igorcrevar.rolloverchuck.objects.StarsObject.java
com.igorcrevar.rolloverchuck.objects.TextButton.java
com.igorcrevar.rolloverchuck.objects.TrailObject.java
com.igorcrevar.rolloverchuck.objects.boxes.BoxManager.java
com.igorcrevar.rolloverchuck.objects.boxes.BoxRegionManager.java
com.igorcrevar.rolloverchuck.objects.boxes.BoxRegion.java
com.igorcrevar.rolloverchuck.objects.boxes.BoxTypeFactory.java
com.igorcrevar.rolloverchuck.objects.boxes.IBoxRegion.java
com.igorcrevar.rolloverchuck.objects.boxes.IBoxType.java
com.igorcrevar.rolloverchuck.physics.CollisionSolver.java
com.igorcrevar.rolloverchuck.physics.ICollisionIterationHandler.java
com.igorcrevar.rolloverchuck.physics.SphereMoving.java
com.igorcrevar.rolloverchuck.points.PlayerPoint.java
com.igorcrevar.rolloverchuck.points.PointsManager.java
com.igorcrevar.rolloverchuck.scenes.GameLoadingScene.java
com.igorcrevar.rolloverchuck.scenes.GameScene.java
com.igorcrevar.rolloverchuck.scenes.IntroScene.java
com.igorcrevar.rolloverchuck.scenes.GameMode.ArcadeGameMode.java
com.igorcrevar.rolloverchuck.scenes.GameMode.IGameMode.java
com.igorcrevar.rolloverchuck.scenes.GameMode.StressFreeGameMode.java
com.igorcrevar.rolloverchuck.utils.CollisionHelper.java
com.igorcrevar.rolloverchuck.utils.GameHelper.java
com.igorcrevar.rolloverchuck.utils.IMyFontDrawerFont.java
com.igorcrevar.rolloverchuck.utils.Mathf.java
com.igorcrevar.rolloverchuck.utils.MyFontDrawerBatch.java
com.igorcrevar.rolloverchuck.utils.MyFontDrawerDefaultFont.java
com.igorcrevar.rolloverchuck.utils.MyFontDrawer.java
com.igorcrevar.rolloverchuck.utils.ShaderAssetLoader.java
com.wayilookatgames.rolloverball.MainActivity.java