From cfb59a3c4a45841abd6ce92c9f5987277d4d0bca Mon Sep 17 00:00:00 2001 From: Ash Reynolds Date: Fri, 12 Feb 2016 23:23:59 +0000 Subject: [PATCH] Increased performance (Huge Refactor) --- core/assets/levels/level1.tmx | 7 +- core/assets/levels/level2.tmx | 11 +- core/assets/spritesheets/uiskin.atlas | 199 ------------------ core/assets/spritesheets/uiskin.json | 3 +- core/assets/spritesheets/uiskin.png | Bin 28299 -> 0 bytes core/src/com/game/Actor/Base.java | 2 +- core/src/com/game/Actor/Box2DSprite.java | 4 +- .../src/com/game/Actor/Object/Background.java | 4 +- core/src/com/game/Actor/Platform.java | 6 +- core/src/com/game/Actor/Player.java | 8 +- core/src/com/game/App.java | 58 ++--- core/src/com/game/Misc/Box2dUtils.java | 4 +- core/src/com/game/Misc/CameraUtils.java | 2 +- .../src/com/game/Misc/ParralaxBackground.java | 4 +- core/src/com/game/Misc/Vars.java | 2 +- core/src/com/game/Screens/AbstractScreen.java | 31 +-- core/src/com/game/Screens/Leaderboard.java | 15 +- core/src/com/game/Screens/LevelSelect.java | 2 +- core/src/com/game/Screens/Loading.java | 66 +++--- core/src/com/game/Screens/Menu.java | 46 ++-- core/src/com/game/Screens/Play.java | 37 ++-- core/src/com/game/managers/ScreenManager.java | 65 ++++++ .../src/com/game/desktop/DesktopLauncher.java | 2 +- 23 files changed, 210 insertions(+), 368 deletions(-) delete mode 100644 core/assets/spritesheets/uiskin.atlas delete mode 100644 core/assets/spritesheets/uiskin.png create mode 100644 core/src/com/game/managers/ScreenManager.java diff --git a/core/assets/levels/level1.tmx b/core/assets/levels/level1.tmx index 4790374..2fb567c 100644 --- a/core/assets/levels/level1.tmx +++ b/core/assets/levels/level1.tmx @@ -1,15 +1,18 @@ - + + + + eJztk8EKACAIQzX//5/rOEKWktGhHgxPy5kl8qmggSLokE31FprsH53xFYyIeRAVvofV+dmdNEcMdYS5mA/rLl6GarJ/OeLP3PVJsH/03bLsHTB3AJM= - + diff --git a/core/assets/levels/level2.tmx b/core/assets/levels/level2.tmx index 3b3605f..f61c147 100644 --- a/core/assets/levels/level2.tmx +++ b/core/assets/levels/level2.tmx @@ -1,19 +1,22 @@ - + + + + eJxjYBgFo2B4ACYK9TMSqQaGKTWLFECJeUxYMDJghmJk9aS4B5t55AJK9A60HZSmv6EIAF6cACk= - + - - + + diff --git a/core/assets/spritesheets/uiskin.atlas b/core/assets/spritesheets/uiskin.atlas deleted file mode 100644 index a51f7bf..0000000 --- a/core/assets/spritesheets/uiskin.atlas +++ /dev/null @@ -1,199 +0,0 @@ -uiskin.png -size: 256,128 -format: RGBA8888 -filter: Linear,Linear -repeat: none -check-off - rotate: false - xy: 11, 5 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -textfield - rotate: false - xy: 11, 5 - size: 14, 14 - split: 3, 3, 3, 3 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-on - rotate: false - xy: 125, 35 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -cursor - rotate: false - xy: 23, 1 - size: 3, 3 - split: 1, 1, 1, 1 - orig: 3, 3 - offset: 0, 0 - index: -1 -default - rotate: false - xy: 1, 50 - size: 254, 77 - orig: 254, 77 - offset: 0, 0 - index: -1 -default-pane - rotate: false - xy: 11, 1 - size: 5, 3 - split: 1, 1, 1, 1 - orig: 5, 3 - offset: 0, 0 - index: -1 -default-rect-pad - rotate: false - xy: 11, 1 - size: 5, 3 - split: 1, 1, 1, 1 - orig: 5, 3 - offset: 0, 0 - index: -1 -default-pane-noborder - rotate: false - xy: 170, 44 - size: 1, 1 - split: 0, 0, 0, 0 - orig: 1, 1 - offset: 0, 0 - index: -1 -default-rect - rotate: false - xy: 38, 25 - size: 3, 3 - split: 1, 1, 1, 1 - orig: 3, 3 - offset: 0, 0 - index: -1 -default-rect-down - rotate: false - xy: 170, 46 - size: 3, 3 - split: 1, 1, 1, 1 - orig: 3, 3 - offset: 0, 0 - index: -1 -default-round - rotate: false - xy: 112, 29 - size: 12, 20 - split: 5, 5, 5, 4 - pad: 4, 4, 1, 1 - orig: 12, 20 - offset: 0, 0 - index: -1 -default-round-down - rotate: false - xy: 99, 29 - size: 12, 20 - split: 5, 5, 5, 4 - pad: 4, 4, 1, 1 - orig: 12, 20 - offset: 0, 0 - index: -1 -default-round-large - rotate: false - xy: 57, 29 - size: 20, 20 - split: 5, 5, 5, 4 - orig: 20, 20 - offset: 0, 0 - index: -1 -default-scroll - rotate: false - xy: 78, 29 - size: 20, 20 - split: 2, 2, 2, 2 - orig: 20, 20 - offset: 0, 0 - index: -1 -default-select - rotate: false - xy: 29, 29 - size: 27, 20 - split: 4, 14, 4, 4 - orig: 27, 20 - offset: 0, 0 - index: -1 -default-select-selection - rotate: false - xy: 26, 16 - size: 3, 3 - split: 1, 1, 1, 1 - orig: 3, 3 - offset: 0, 0 - index: -1 -default-slider - rotate: false - xy: 29, 20 - size: 8, 8 - split: 2, 2, 2, 2 - orig: 8, 8 - offset: 0, 0 - index: -1 -default-slider-knob - rotate: false - xy: 1, 1 - size: 9, 18 - orig: 9, 18 - offset: 0, 0 - index: -1 -default-splitpane - rotate: false - xy: 17, 1 - size: 5, 3 - split: 0, 5, 0, 0 - orig: 5, 3 - offset: 0, 0 - index: -1 -default-splitpane-vertical - rotate: false - xy: 125, 29 - size: 3, 5 - split: 0, 0, 0, 5 - orig: 3, 5 - offset: 0, 0 - index: -1 -default-window - rotate: false - xy: 1, 20 - size: 27, 29 - split: 4, 3, 20, 3 - orig: 27, 29 - offset: 0, 0 - index: -1 -selection - rotate: false - xy: 174, 48 - size: 1, 1 - orig: 1, 1 - offset: 0, 0 - index: -1 -tree-minus - rotate: false - xy: 140, 35 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -tree-plus - rotate: false - xy: 155, 35 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -white - rotate: false - xy: 129, 31 - size: 3, 3 - orig: 3, 3 - offset: 0, 0 - index: -1 \ No newline at end of file diff --git a/core/assets/spritesheets/uiskin.json b/core/assets/spritesheets/uiskin.json index 96fb3a6..b0ec92c 100644 --- a/core/assets/spritesheets/uiskin.json +++ b/core/assets/spritesheets/uiskin.json @@ -6,8 +6,7 @@ com.badlogic.gdx.graphics.Color: { black: { a: 1, b: 0, g: 0, r: 0 }, }, com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle: { - default: { down: default-round-down, up: default-round, font: default-font, fontColor: white, overFontColor: red }, - toggle: { down: default-round-down, up: default-round, checked: default-round-down, font: default-font, fontColor: white, downFontColor: red } + default: { down: null, up: null, font: default-font, fontColor: white, overFontColor: red }, }, com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: { default: { font: default-font, fontColor: white } diff --git a/core/assets/spritesheets/uiskin.png b/core/assets/spritesheets/uiskin.png deleted file mode 100644 index c1e5f1a210e11a24ba2065e93e665839852b6aed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28299 zcmXV1Wmp?cv`&IkDDLjX-HJPu0>$0ExH|+Z?(P()xVskDQk>%M!Ch{?d+#3}WSQ*F z&YbhwM0`_}K}9A+1^@u4aejyE zp#!2i+jT+cgoK2NY}l=Hw1LszPlb#fagpM@A_edT6toPbPVC;!`HhFhXZbE6l@IWk9)f9 zuGaB@|30w=6I@pIDfmV5B@%~`kfgWke*L87nh+C&8JK0?KI(`Bz5Bj9!!Ll5yK6O8 z!*1V~HIEIFjY@6K>FR(AmEtdg@p-F3HF|B%ed-^Zjh-E70FPIDoTUNK=ii2OUQc0r zI0J8RTHl^df-8ujLv2g|(KE8RtT8uQopz{mHhkP>knqioYvG_blZFX~4nzRTe+8)g zWd<6dH5+|ses>1_$rlTL_~+0g^z-^%R7m!JCngLL;07o^5(EABz#@`>cVIgWzzfnoe&F-CHz2h1--KRQd0uYkO7>EU1h8t?7f}FOR-L0Z3@S9L zsB`YIqhb^yU;b~*JO}Lti(6_C;o~xcX7y>uS@XY#9;a&sIl3#&8UrEW5-%4@-_GOz zyI6@9dff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=qTxX36t+5ilZ&GG3b%mj^G!LdV6Op096!iN^zYk4A6Q`>RlzZqr?F>-3y+^djVs6c*^I#qGK?NfOFCv^GWI5w(P@N~=a~fjm zY&b~le4s_LOuHqiE2*w~XdN5KN~?3S2PUKiz9+Tmc1xiEafx>%oCF{{N4k$AcJeo6+yry$= Vars.STEP) { - accum -= Vars.STEP; - sm.handleInput(); - sm.update(Vars.STEP); - sm.render(); - }*/ - - if(Gdx.input.isKeyPressed(Input.Keys.ESCAPE)) { Gdx.app.exit(); } } @Override public void dispose () { super.dispose(); - assetManager.dispose(); sb.dispose(); sr.dispose(); + assets.dispose(); + sm.dispose(); } public SpriteBatch getSpriteBatch() { return sb; } public ShapeRenderer getSr() { return sr; } - //public OrthographicCamera getCam() { return cam; } - //public OrthographicCamera getHudCam() { return hudCam; } - public AssetManager getAssetManager() { return assetManager; } + public AssetManager getAssetManager() { return assets; } } diff --git a/core/src/com/game/Misc/Box2dUtils.java b/core/src/com/game/Misc/Box2dUtils.java index c31c11b..458209a 100644 --- a/core/src/com/game/Misc/Box2dUtils.java +++ b/core/src/com/game/Misc/Box2dUtils.java @@ -1,9 +1,9 @@ -package com.game.Misc; +package com.game.misc; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.*; -import static com.game.Misc.Vars.PPM; +import static com.game.misc.Vars.PPM; /** * Created by Ash on 09/02/2016. diff --git a/core/src/com/game/Misc/CameraUtils.java b/core/src/com/game/Misc/CameraUtils.java index 6e58ec6..c6a97e9 100644 --- a/core/src/com/game/Misc/CameraUtils.java +++ b/core/src/com/game/Misc/CameraUtils.java @@ -1,4 +1,4 @@ -package com.game.Misc; +package com.game.misc; import com.badlogic.gdx.graphics.Camera; import com.badlogic.gdx.math.Vector2; diff --git a/core/src/com/game/Misc/ParralaxBackground.java b/core/src/com/game/Misc/ParralaxBackground.java index 4336cf4..835f443 100644 --- a/core/src/com/game/Misc/ParralaxBackground.java +++ b/core/src/com/game/Misc/ParralaxBackground.java @@ -1,7 +1,7 @@ -package com.game.Misc; +package com.game.misc; import com.badlogic.gdx.math.Vector2; -import com.game.Actor.Object.Background; +import com.game.actor.object.Background; /** * Created by Ash on 09/02/2016. diff --git a/core/src/com/game/Misc/Vars.java b/core/src/com/game/Misc/Vars.java index 8f041cd..965e0ef 100644 --- a/core/src/com/game/Misc/Vars.java +++ b/core/src/com/game/Misc/Vars.java @@ -1,4 +1,4 @@ -package com.game.Misc; +package com.game.misc; import com.badlogic.gdx.math.Vector2; diff --git a/core/src/com/game/Screens/AbstractScreen.java b/core/src/com/game/Screens/AbstractScreen.java index cbb5dda..f83e415 100644 --- a/core/src/com/game/Screens/AbstractScreen.java +++ b/core/src/com/game/Screens/AbstractScreen.java @@ -1,15 +1,14 @@ -package com.game.Screens; +package com.game.screens; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; -import com.badlogic.gdx.graphics.g2d.SpriteBatch; -import com.badlogic.gdx.graphics.glutils.ShapeRenderer; +import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.scenes.scene2d.Stage; import com.game.App; -import com.game.Misc.Vars; +import com.game.misc.Vars; /** * Created by Ash on 11/02/2016. @@ -19,38 +18,38 @@ public abstract class AbstractScreen implements Screen { // App reference protected App app; - // Batches + /*// Manager references + protected AssetManager assets; + + // Batch references protected SpriteBatch sb; - protected ShapeRenderer sr; + protected ShapeRenderer sr;*/ + + // Cameras protected OrthographicCamera cam; protected OrthographicCamera hudCam; - // Managers - protected AssetManager assets; - // Stage protected Stage stage; public AbstractScreen(final App app) { this.app = app; - sb = app.getSpriteBatch(); - sr = app.getSr(); cam = new OrthographicCamera(); cam.setToOrtho(false, Vars.SCREEN_WIDTH, Vars.SCREEN_HEIGHT); hudCam = new OrthographicCamera(); hudCam.setToOrtho(false, Vars.SCREEN_WIDTH, Vars.SCREEN_HEIGHT); - assets = app.getAssetManager(); - stage = new Stage(); + this.stage = new Stage(); } @Override public void show() { + System.out.println("Showing screen: " + this.getClass().getSimpleName()); Gdx.input.setInputProcessor(stage); } @@ -62,13 +61,14 @@ public abstract class AbstractScreen implements Screen { update(dt); Gdx.gl.glClearColor(0, 0, 0, 1f); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); + app.sb.setProjectionMatrix(cam.combined); } public abstract void handleInput(); @Override public void resize(int width, int height) { - + stage.getViewport().update(width, height, true); } @Override @@ -83,11 +83,12 @@ public abstract class AbstractScreen implements Screen { @Override public void hide() { - + Gdx.input.setInputProcessor(null); } @Override public void dispose() { stage.dispose(); + System.out.println("Disposing screen: " + this.getClass().getSimpleName()); } } diff --git a/core/src/com/game/Screens/Leaderboard.java b/core/src/com/game/Screens/Leaderboard.java index 84a5a97..cfcd018 100644 --- a/core/src/com/game/Screens/Leaderboard.java +++ b/core/src/com/game/Screens/Leaderboard.java @@ -1,10 +1,13 @@ -package com.game.Screens; +package com.game.screens; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Input; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.game.App; +import com.game.managers.ScreenManager; /** * Created by Ash on 11/02/2016. @@ -33,15 +36,15 @@ public class Leaderboard extends AbstractScreen { public void render(float dt) { super.render(dt); - sb.begin(); - sb.draw(assets.get("textures/leaderboardBackground.jpg", Texture.class), 0, 0); - assets.get("badaboom25.ttf", BitmapFont.class).draw(sb,"Press M to go back to menu", 100, 100); - sb.end(); + app.sb.begin(); + app.sb.draw(app.assets.get("textures/leaderboardBackground.jpg", Texture.class), 0, 0); + app.assets.get("badaboom25.ttf", BitmapFont.class).draw(app.sb,"Press M to go back to menu", 100, 100); + app.sb.end(); } @Override public void handleInput() { - + if(Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) { app.sm.setScreen(ScreenManager.Screen.MENU); } } @Override diff --git a/core/src/com/game/Screens/LevelSelect.java b/core/src/com/game/Screens/LevelSelect.java index 80a5d82..af6d9ff 100644 --- a/core/src/com/game/Screens/LevelSelect.java +++ b/core/src/com/game/Screens/LevelSelect.java @@ -1,4 +1,4 @@ -package com.game.Screens; +package com.game.screens; /** * Created by Ash on 11/02/2016. diff --git a/core/src/com/game/Screens/Loading.java b/core/src/com/game/Screens/Loading.java index de4ac98..6aff0e2 100644 --- a/core/src/com/game/Screens/Loading.java +++ b/core/src/com/game/Screens/Loading.java @@ -1,6 +1,5 @@ -package com.game.Screens; +package com.game.screens; -import com.badlogic.gdx.Gdx; import com.badlogic.gdx.assets.loaders.FileHandleResolver; import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver; import com.badlogic.gdx.audio.Music; @@ -16,17 +15,16 @@ import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.game.App; +import com.game.managers.ScreenManager; /** * Created by Ash on 11/02/2016. */ public class Loading extends AbstractScreen { - private Image logo; - private float percent; - private Rectangle loadingRect; + private Texture logo; public Loading(App app) { super(app); @@ -35,17 +33,17 @@ public class Loading extends AbstractScreen { @Override public void show() { super.show(); + FileHandleResolver resolver = new InternalFileHandleResolver(); - assets.setLoader(FreeTypeFontGenerator.class, new FreeTypeFontGeneratorLoader(resolver)); - assets.setLoader(BitmapFont.class, ".ttf", new FreetypeFontLoader(resolver)); + app.assets.setLoader(FreeTypeFontGenerator.class, new FreeTypeFontGeneratorLoader(resolver)); + app.assets.setLoader(BitmapFont.class, ".ttf", new FreetypeFontLoader(resolver)); loadFont("fonts/badaboom.TTF", 60, Color.BLACK); - assets.load("textures/player.png", Texture.class); - assets.finishLoading(); // make sure player texture and font is loaded + app.assets.load("textures/player.png", Texture.class); + app.assets.finishLoading(); // make sure player texture and font is loaded - logo = new Image(assets.get("textures/player.png", Texture.class)); - logo.setPosition((stage.getWidth() / 2) - logo.getWidth() / 2, (stage.getHeight() / 1.5f) - logo.getHeight() / 2); + logo = app.assets.get("textures/player.png", Texture.class); loadingRect = new Rectangle(stage.getWidth() / 6f, (stage.getHeight() / 2f - 25), 0, 25); assetsToLoad(); @@ -53,12 +51,12 @@ public class Loading extends AbstractScreen { @Override public void update(float dt) { - percent = Interpolation.linear.apply(percent, assets.getProgress(), 0.3f); + percent = Interpolation.linear.apply(percent, app.assets.getProgress(), 0.3f); loadingRect.width = 0 + 853.3333f * percent; - if (assets.update() && loadingRect.width >= 852f) { // continue to menu screen when all assets have loaded - app.setScreen(new Menu(app)); + if (app.assets.update() && loadingRect.width >= 852f) { // continue to menu screen when all assets have loaded + app.sm.setScreen(ScreenManager.Screen.MENU); } } @@ -66,17 +64,18 @@ public class Loading extends AbstractScreen { public void render(float dt) { super.render(dt); - sr.begin(ShapeRenderer.ShapeType.Filled); - sr.setColor(1, 0, 0, 1); - sr.rect(loadingRect.x, loadingRect.y, loadingRect.width, loadingRect.height); // Red loading bar - sr.set(ShapeRenderer.ShapeType.Line); - sr.rect(loadingRect.x, loadingRect.y, 853.3333f, loadingRect.height); // Outline - sr.end(); + // Loading bar + app.sr.begin(ShapeRenderer.ShapeType.Filled); + app.sr.setColor(1, 0, 0, 1); + app.sr.rect(loadingRect.x, loadingRect.y, loadingRect.width, loadingRect.height); // Red loading bar + app.sr.set(ShapeRenderer.ShapeType.Line); + app.sr.rect(loadingRect.x, loadingRect.y, 853.3333f, loadingRect.height); // Outline + app.sr.end(); - sb.begin(); - assets.get("badaboom60.ttf", BitmapFont.class).draw(sb, "Loading", stage.getWidth() / 2 - 80, loadingRect.y + 80); - logo.draw(sb, 1f); - sb.end(); + app.sb.begin(); + app.assets.get("badaboom60.ttf", BitmapFont.class).draw(app.sb, "Loading", stage.getWidth() / 2 - 80, loadingRect.y + 80); + app.sb.draw(logo, (stage.getWidth() / 2) - logo.getWidth() / 2, (stage.getHeight() / 1.5f) - logo.getHeight() / 2); + app.sb.end(); } @Override @@ -87,6 +86,7 @@ public class Loading extends AbstractScreen { @Override public void dispose() { super.dispose(); + logo.dispose(); } private void assetsToLoad() @@ -96,16 +96,16 @@ public class Loading extends AbstractScreen { loadFont("fonts/badaboom.TTF", 45, Color.BLACK); - assets.load("textures/badlogic.jpg", Texture.class); - assets.load("textures/menuBackground.jpg", Texture.class); - assets.load("textures/leaderboardBackground.jpg", Texture.class); - assets.load("textures/position0.png", Texture.class); - assets.load("textures/position1.png", Texture.class); - assets.load("textures/position2.png", Texture.class); + app.assets.load("textures/badlogic.jpg", Texture.class); + app.assets.load("textures/menuBackground.jpg", Texture.class); + app.assets.load("textures/leaderboardBackground.jpg", Texture.class); + app.assets.load("textures/position0.png", Texture.class); + app.assets.load("textures/position1.png", Texture.class); + app.assets.load("textures/position2.png", Texture.class); - assets.load("sounds/jumping.mp3", Sound.class); + app.assets.load("sounds/jumping.mp3", Sound.class); - assets.load("music/TheComplex.mp3", Music.class); + app.assets.load("music/TheComplex.mp3", Music.class); } private void loadFont(String fontFileName, int size, Color borderColour) @@ -116,6 +116,6 @@ public class Loading extends AbstractScreen { params.fontParameters.borderWidth = 2; params.fontParameters.borderColor = borderColour; - assets.load("badaboom" + size + ".ttf", BitmapFont.class, params); + app.assets.load("badaboom" + size + ".ttf", BitmapFont.class, params); } } diff --git a/core/src/com/game/Screens/Menu.java b/core/src/com/game/Screens/Menu.java index 4a8714a..5d15c3b 100644 --- a/core/src/com/game/Screens/Menu.java +++ b/core/src/com/game/Screens/Menu.java @@ -1,28 +1,26 @@ -package com.game.Screens; +package com.game.screens; import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Input; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.math.Vector2; -import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.game.App; +import com.game.managers.ScreenManager; import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.alpha; -import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeIn; /** * Created by Ash on 11/02/2016. */ public class Menu extends AbstractScreen { - private TextureAtlas atlas; private Skin skin; // Buttons @@ -33,15 +31,7 @@ public class Menu extends AbstractScreen { public Menu(App app) { super(app); - - atlas = new TextureAtlas("spriteSheets/uiskin.atlas"); - skin = new Skin(atlas); - - skin.add("default-font", assets.get("badaboom60.ttf", BitmapFont.class)); - skin.load(Gdx.files.internal("spritesheets/uiskin.json")); - - music = assets.get("music/TheComplex.mp3", Music.class); - music.setLooping(true); + skin = new Skin(); buttonSize = new Vector2(128, 40); } @@ -49,6 +39,13 @@ public class Menu extends AbstractScreen { @Override public void show() { super.show(); + + skin.add("default-font", app.assets.get("badaboom60.ttf", BitmapFont.class)); + skin.load(Gdx.files.internal("spritesheets/uiskin.json")); + + music = app.assets.get("music/TheComplex.mp3", Music.class); + music.setLooping(true); + initButtons(); music.play(); } @@ -56,6 +53,7 @@ public class Menu extends AbstractScreen { @Override public void update(float dt) { stage.act(dt); + } @Override @@ -63,21 +61,16 @@ public class Menu extends AbstractScreen { { super.render(dt); - sb.begin(); - sb.draw(assets.get("textures/menuBackground.jpg", Texture.class), 0, 0); - sb.end(); + app.sb.begin(); + app.sb.draw(app.assets.get("textures/menuBackground.jpg", Texture.class), 0, 0); + app.sb.end(); stage.draw(); } @Override public void handleInput() { - - } - - @Override - public void hide() { - super.hide(); + if(Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) { Gdx.app.exit(); } } @Override @@ -93,9 +86,8 @@ public class Menu extends AbstractScreen { butPlay.addListener(new ClickListener() { @Override public void clicked (com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y) { - Gdx.input.setInputProcessor(null); music.stop(); - app.setScreen(new Play(app)); + app.sm.setPlayScreen(1); } }); @@ -105,8 +97,7 @@ public class Menu extends AbstractScreen { butLeaderboard.addListener(new ClickListener() { @Override public void clicked (com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y) { - Gdx.input.setInputProcessor(null); - app.setScreen(new Leaderboard(app)); + app.sm.setScreen(ScreenManager.Screen.LEADERBOARD); } }); @@ -120,7 +111,6 @@ public class Menu extends AbstractScreen { } }); - //butPlay.addAction(parallel(alpha(0), moveTo(stage.getWidth() / 2, stage.getHeight() / 2, 5f, Interpolation.pow5), sequence(alpha(0f), fadeIn(1.5f, Interpolation.pow2)))); butPlay.addAction(sequence(alpha(0f), fadeIn(1f, Interpolation.pow2))); butLeaderboard.addAction(sequence(alpha(0f), fadeIn(1.5f, Interpolation.pow2))); butExit.addAction(sequence(alpha(0f), fadeIn(2f, Interpolation.pow2))); diff --git a/core/src/com/game/Screens/Play.java b/core/src/com/game/Screens/Play.java index b8c36d9..bd0f408 100644 --- a/core/src/com/game/Screens/Play.java +++ b/core/src/com/game/Screens/Play.java @@ -1,4 +1,4 @@ -package com.game.Screens; +package com.game.screens; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; @@ -17,16 +17,17 @@ import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer; import com.badlogic.gdx.math.Polyline; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.*; -import com.game.Actor.Base; -import com.game.Actor.Platform; -import com.game.Actor.Player; +import com.game.actor.Base; +import com.game.actor.Platform; +import com.game.actor.Player; import com.game.App; -import com.game.Misc.CameraUtils; -import com.game.Misc.Vars; +import com.game.managers.ScreenManager; +import com.game.misc.CameraUtils; +import com.game.misc.Vars; import java.util.ArrayList; -import static com.game.Misc.Vars.PPM; +import static com.game.misc.Vars.PPM; /** * Created by Ash on 11/02/2016. @@ -51,11 +52,15 @@ public class Play extends AbstractScreen { private Player player; private ArrayList platforms = new ArrayList(); + private int levelNumber; + private Sound jumpSound = Gdx.audio.newSound(Gdx.files.internal("sounds/jumping.mp3")); - public Play(App app) { + public Play(App app, int levelNumber) { super(app); + this.levelNumber = levelNumber; + world = new World(new Vector2(0, Vars.GRAVITY.y), true); world.setContactListener(cl); @@ -91,15 +96,14 @@ public class Play extends AbstractScreen { public void render(float dt) { super.render(dt); - Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - sb.setProjectionMatrix(cam.combined); + app.sb.setProjectionMatrix(cam.combined); if(!isDebug) { - sb.begin(); - assets.get("badaboom25.ttf", BitmapFont.class).draw(sb,"Press M to go back to menu", 0, 0); - player.render(sb); - sb.end(); + app.sb.begin(); + app.assets.get("badaboom25.ttf", BitmapFont.class).draw(app.sb,"Press M to go back to menu", 0, 0); + player.render(app.sb); + app.sb.end(); tmr.setView(cam); tmr.render(); @@ -118,8 +122,7 @@ public class Play extends AbstractScreen { player.jump(); } - - + if(Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) { app.sm.setScreen(ScreenManager.Screen.MENU); } if(Gdx.input.isKeyJustPressed(Input.Keys.V)) { isDebug = !isDebug; } } @@ -131,7 +134,7 @@ public class Play extends AbstractScreen { private void setupLevel() { - tileMap = new TmxMapLoader().load("levels/level1.tmx"); + tileMap = new TmxMapLoader().load("levels/level" + levelNumber + ".tmx"); tmr = new OrthogonalTiledMapRenderer(tileMap); MapProperties mapProp = tileMap.getProperties(); diff --git a/core/src/com/game/managers/ScreenManager.java b/core/src/com/game/managers/ScreenManager.java new file mode 100644 index 0000000..6e8d004 --- /dev/null +++ b/core/src/com/game/managers/ScreenManager.java @@ -0,0 +1,65 @@ +package com.game.managers; + +import com.game.App; +import com.game.screens.*; + +import java.util.HashMap; + +/** + * Created by Ash on 12/02/2016. + */ +public class ScreenManager { + + private final App app; + + private HashMap screens = new HashMap(); + public enum Screen + { + LOADING, + MENU, + LEADERBOARD, + LEVELSELECT, + PLAY, + } + + public ScreenManager(final App app) + { + this.app = app; + initScreens(); + } + + private void initScreens() + { + screens.put(Screen.LOADING, new Loading(app)); + screens.put(Screen.MENU, new Menu(app)); + screens.put(Screen.LEADERBOARD, new Leaderboard(app)); + } + + public void setPlayScreen(int levelNumber) + { + // remove loaded level + if(screens.get(Screen.PLAY) != null) + { + screens.get(Screen.PLAY).dispose(); + screens.remove(Screen.PLAY); + } + screens.put(Screen.PLAY, new Play(app, levelNumber)); + setScreen(Screen.PLAY); + } + + public void setScreen(Screen s) + { + app.setScreen(screens.get(s)); + } + + public void dispose() + { + for(AbstractScreen s : screens.values()) + { + if(s != null) + { + s.dispose(); + } + } + } +} diff --git a/desktop/src/com/game/desktop/DesktopLauncher.java b/desktop/src/com/game/desktop/DesktopLauncher.java index 816feca..8dec18d 100644 --- a/desktop/src/com/game/desktop/DesktopLauncher.java +++ b/desktop/src/com/game/desktop/DesktopLauncher.java @@ -4,7 +4,7 @@ import com.badlogic.gdx.Files; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import com.game.App; -import com.game.Misc.Vars; +import com.game.misc.Vars; public class DesktopLauncher { public static void main (String[] arg) {