From 37691d64ba1b096adb5358c77cc2e44c36d98bad Mon Sep 17 00:00:00 2001 From: Matt Soucy Date: Tue, 5 Nov 2019 23:12:12 -0500 Subject: [PATCH] Through stage 4 --- android/assets/images/bucket.png | Bin 3023 -> 0 bytes android/assets/images/drop.png | Bin 4163 -> 0 bytes android/assets/images/game.atlas | 20 ++++++++ android/assets/images/game.png | Bin 0 -> 11287 bytes build.gradle | 2 + core/src/me/msoucy/ptures/EAssets.kt | 32 +++++++++++++ core/src/me/msoucy/ptures/PTures.kt | 10 ++-- .../me/msoucy/ptures/screens/GameScreen.kt | 26 +++++------ .../me/msoucy/ptures/screens/LoadingScreen.kt | 43 ++++++++++++++++++ .../msoucy/ptures/screens/MainMenuScreen.kt | 30 ------------ .../msoucy/ptures/desktop/DesktopLauncher.kt | 9 +++- 11 files changed, 122 insertions(+), 50 deletions(-) delete mode 100644 android/assets/images/bucket.png delete mode 100644 android/assets/images/drop.png create mode 100644 android/assets/images/game.atlas create mode 100644 android/assets/images/game.png create mode 100644 core/src/me/msoucy/ptures/EAssets.kt create mode 100644 core/src/me/msoucy/ptures/screens/LoadingScreen.kt delete mode 100644 core/src/me/msoucy/ptures/screens/MainMenuScreen.kt diff --git a/android/assets/images/bucket.png b/android/assets/images/bucket.png deleted file mode 100644 index 0538dc345d3b1681028dfb72ee641d26842bb74a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3023 zcmV;=3o!JFP)+4+m?tSdu-PxV@%;_IH``&wfL+Kf^XiZslEZo_pQ5B4N|dw%DwI${i6j({4O!P4tm~Q)S&Sn49LR`J!>= ziHrLLczRy{w*Ox5O)ax6BHd0*6c#01TwEMXOe{=HR8NeMlarI7F;GN=__Sz3Zek?H z_vA}_?v%F+z?bddf%;p+$AXg$LIj&KWn3!7QN|t`txkNJ78`HZie2U;5zN zTk_NazVpgG*C}z7BTNq%+0PmvD{LesWrwSTIR9CD#N^|f_f)BH9~Bfivb$saOqxb8 zn8oE)vNzxMS4zLH0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ets/images/drop.png deleted file mode 100644 index 8ce41f48d6440b39fd9cd4f654b7ba5d2385734a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4163 zcmV-J5WMe+P)k2XskIMF-sm1_cBu=t_{T000l-NklRT2#hnb7{wXScpMZ*R1{D-;~YKAxE`HRz;SdU z1B$3%Sey_gBtVCdPA4HGou!xbQoU5wd-wO7KWm(Z{#lz4(gpr01+4 zVA)+w{|0(vvNXa~ja3}!3E1%BQ6lCT3SPdqaa?E_S1+*i(=UTz5-K+ap>omeG6E~q zCL%OcMLE!w1=a7pd~f6V<3-cBBVg&BFFlIk%4yX_ynRt6)(Qp~41@=tYs2>d;Vr8A zT+{t4$DE#VL%@!&*UAA6UHpd4Iv}|MRCUfO9_n2NwR_ixE`6 zE7r1dMj6Jy%V0WA9HW)^*H^IBDX zZx9G?U06;S3d^RKQdRn9`+Ip~5>%OzjL}e23{DjuZT{9;=H5IuLKrgvEd1L|Z2#J7 zRQPWdVOlaqeN_xqxO8dtiHY$Hmo9Uvu=boPtW^*xpL_Gh2b#aVc1-9T(>P$^M>qW| z=xtWuhBb9WeUHl;t64fd@qa$|ohSCw-52oE-d;Ap){OyFWihHvyS{hHsM0tl2w3pp z-?88$zgwazw~1BGpOc_CVyG(h|6k?-uD+m-Y#=nwET=r~qavv26T7~53A1nf)gQM2 z=C6N_9S>ZHiav!X6>-OOHW1!-!NgOVqdF1gy!kFRxMF23L100(e%6h@`fAI+UplJv zj)@A)|IoAF1a1kfux?E~r7@3l=T@?IarKDi`TEcHFqpBt(A>qA=DaFsBcj{(Jbd}6 z&^oFJn0NC==H2?t`Ko%0SYgG?auUTJB{6@*%mZAvW-{5pa_+n;%8I>QlqgT`dH8Z> zT>JAsE&&iPo>9)_D<_=MykGs#X0n0s{Ps?^ zHh1M!;e14%-?!naGn#u;5HRNhzhTZ_|Mo&u*NL?(o}M6?h!XV;m#>_FDp&<85Eit+ zLbjk~EM!7Rhma0jUtr8@lS+B# zh4q9M`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E)+wgy8}^3#BxThkl`W8oj@45>!=UwSL8f~oJ{hL@!C>1es-06)@wgP z)c1I;xgA6ikw?c=003(BAyjF4t%ImwEC@^ZW6Ak7(=bfD4JAc_UX7 zIL#v;=-8a=91@Vg+ZtS-*WLkreFWK%E!z&d99iwXBYoFtsX*1Y9zaDtjurOp@8Q59 zSDG%``x>4Pzj@syDx-Ob!lD|Olv4wLXA_=pcVqtw@xV~#jzQeDMB7It<*cgCT? z_uNlI-wWh2yD+zF~e!<2-(##;PsFF;2dk%-Sj|M3#72YUg*DC@J`pMU&xn1@kN z(ZtOAv0XiQ6^Xs5P7gw1)zV2^vStR^z@kMlWad1iCJEMA_^fr?T!A=m;XV*|^A-8I zs#rd6*tZXFj|=U^3O{&w8|@wa7#D4PC+Pjc&1XXYsC*w#*6?K{3_RocyHTAk0yW7v zS6{h+L}?VU0b8(Ql#`w!u~Iw5#6Ku zkyJ_jJq#TD6!E$*tVel3HD5gvX3wnVoQ1W_oL)`5ID%M3RNePJI92eB!S@UuoddM& z?qKV-L$tM}h(tUT#fV9%(aY?>y_-gh<}v$LxVYwX)nLA*s_%7)kRnzI0!u}CjGAN# zr6o~fMG-`VOvcjPJxE)7KiN!x?|EQyIwA^&FWbTU{=tub5<58JfN%T-5UcqdnU1@N zReyG>s@?&t&s#c0$^T;%@`X%>3WDx;1?UF;3HXXl-~dlm3NWt z{u}_&@_$^7>N|lYDmovi0WC+cil%@=sO|t>6p=?X`{h&G+&Gite*tTE=J@toc|`yK N002ovPDHLkV1gkA<4OPk diff --git a/android/assets/images/game.atlas b/android/assets/images/game.atlas new file mode 100644 index 0000000..2f31d8f --- /dev/null +++ b/android/assets/images/game.atlas @@ -0,0 +1,20 @@ + +game.png +size: 256,128 +format: RGBA8888 +filter: Nearest,Nearest +repeat: none +bucket + rotate: false + xy: 2, 2 + size: 64, 64 + orig: 64, 64 + offset: 0, 0 + index: -1 +drop + rotate: false + xy: 70, 2 + size: 64, 64 + orig: 64, 64 + offset: 0, 0 + index: -1 \ No newline at end of file diff --git a/android/assets/images/game.png b/android/assets/images/game.png new file mode 100644 index 0000000000000000000000000000000000000000..7dc836149029f3485dbd1b41d308cbcd3e10d6a0 GIT binary patch literal 11287 zcmdtI_dnJD|3CgX!$Hy#g2t z*wu5XzTxVF$m~6|s?p0o+acsHua6&Je2W1Wv83|q1!e#*mUvzS3o+N=)n7*3*W!M6 zlAjUO`1RlOe%2fr z&j)|LxQwb*RWF@24>Y6>_EgTDupn3WnidFt)EW8xt$!Ol!~A=aZVc^XrIu=s^Ob@= zdOx`wE>h>uWFz2`-ghJmg;s8W+i@^*I?l13ChGN+*knnyUNAU-R!=Wb>3BBf%^V`>a>BiJpv(9DWU&mX=mRMFA#%;><>6P+ezW z3)VZ$95PL`Wo2chTwh;z`~Ca(i_)^Pe22?!KjB!n$*NMn&54n-qs=%KEp{1?o6?X4 zABF-Q!7%dAb8*;R{mvlnBwL@;^nmQm>Hf#WP(^D`I901c0vD`^9h?YC1$8E4sZxJ* zC9u?gGO2b&AD&2J3L{@pM%7S8aW?fXkiZL`jJ_y0#u{sn2dX1ryYM|*Fr3EBkRo3r zzE(294Uxfa+K8>P`hK>u(3LSY!y`Y`;S@R3(0HE%aN)GQ_PXPA^VyqjV}nlu4BZk4N76 zpL(~$#blM=`YIRb$!hEO1!0$2p{L6%XGfFPM-033IIl!r<%1c2+&XUHwh|s!$PS^7 zrLh&vX`^Tz{3?1GRvWMuCQ=Ocb+QQz`v9tGyDd;t{A>>7%Gg*y`0m6Vs)e(ttUs}8 zdO~(gW~LeS3kez@a=zR>bm_8S?>kT`7V|eC*wIghU>x0a#54N0{CnojeTV` zS)}d5fRC&dMC1VgDJ?n~|IN;<9P%k3SdwypuEwT?p&r z({fw>s^ei6Zb?%Z!F!V7Gg0wG{ocKMfthrCy+41BbOge0w@QYSV30PqZ`DbLnwVX+ z&WO!bw;@ypDi!-^aW}vjOL~+q7x>E~8$~7!a$WwO@oy!sjFu+=u2O&eug)S4o9_1Y z-xqKT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kUC z1X1Aqx2Eu^gLw*WnY6?jFLRxowt%S3kh zo(3R(GWZtJz(9hq0zz=6TiH@>WesnxoTHY@XUtvZ>u(|hZ|sIonR9j49anrCJ?A!N zUr`YweV&+e8aBls&)ywghNWMjaD)q{Wr>cWbc2h=m`>Mwg2GQ3AU z_)q$cIV+WgVBA99Mjsw(bY!2(;DR4*&a^aSvz8~^$9o9aTtCXwEi7EDh!`YIM|66Y zJ|>>h0A*x+9TYtZyWdJkmSI$ons{uY2C;NUEc8m$pt#`_Q1Jf`7E%ZytZV}YU7n{M R``^9adm0bWRcba7{}0z#3+Vs= literal 0 HcmV?d00001 diff --git a/build.gradle b/build.gradle index f2c7aef..3b7f460 100644 --- a/build.gradle +++ b/build.gradle @@ -104,7 +104,9 @@ project(":core") { api "com.badlogicgames.ashley:ashley:$ashleyVersion" api "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" api "io.github.libktx:ktx-app:$ktxVersion" + api "io.github.libktx:ktx-assets:$ktxVersion" api "io.github.libktx:ktx-collections:$ktxVersion" api "io.github.libktx:ktx-graphics:$ktxVersion" + api "io.github.libktx:ktx-log:$ktxVersion" } } diff --git a/core/src/me/msoucy/ptures/EAssets.kt b/core/src/me/msoucy/ptures/EAssets.kt new file mode 100644 index 0000000..c601f82 --- /dev/null +++ b/core/src/me/msoucy/ptures/EAssets.kt @@ -0,0 +1,32 @@ +package me.msoucy.ptures + +import com.badlogic.gdx.assets.AssetManager +import com.badlogic.gdx.audio.Music +import com.badlogic.gdx.audio.Sound +import com.badlogic.gdx.graphics.g2d.TextureAtlas +import ktx.assets.getAsset +import ktx.assets.load + +// sounds +enum class SoundAssets(val path: String) { + Drop("sounds/drop.wav") +} + +inline fun AssetManager.load(asset: SoundAssets) = load(asset.path) +inline operator fun AssetManager.get(asset: SoundAssets) = getAsset(asset.path) + +// music +enum class MusicAssets(val path: String) { + Rain("music/rain.mp3") +} + +inline fun AssetManager.load(asset: MusicAssets) = load(asset.path) +inline operator fun AssetManager.get(asset: MusicAssets) = getAsset(asset.path) + +// texture atlas +enum class TextureAtlasAssets(val path: String) { + Game("images/game.atlas") +} + +inline fun AssetManager.load(asset: TextureAtlasAssets) = load(asset.path) +inline operator fun AssetManager.get(asset: TextureAtlasAssets) = getAsset(asset.path) \ No newline at end of file diff --git a/core/src/me/msoucy/ptures/PTures.kt b/core/src/me/msoucy/ptures/PTures.kt index 79d6978..0d52a5b 100644 --- a/core/src/me/msoucy/ptures/PTures.kt +++ b/core/src/me/msoucy/ptures/PTures.kt @@ -1,25 +1,27 @@ package me.msoucy.ptures +import com.badlogic.gdx.assets.AssetManager import com.badlogic.gdx.graphics.g2d.BitmapFont import com.badlogic.gdx.graphics.g2d.SpriteBatch import ktx.app.KtxGame import ktx.app.KtxScreen -import me.msoucy.ptures.screens.MainMenuScreen +import me.msoucy.ptures.screens.LoadingScreen class PTures : KtxGame() { val batch by lazy { SpriteBatch() } - // use LibGDX's default Arial font val font by lazy { BitmapFont() } + val assets = AssetManager() override fun create() { - addScreen(MainMenuScreen(this)) - setScreen() + addScreen(LoadingScreen(this)) + setScreen() super.create() } override fun dispose() { batch.dispose() font.dispose() + assets.dispose() super.dispose() } } diff --git a/core/src/me/msoucy/ptures/screens/GameScreen.kt b/core/src/me/msoucy/ptures/screens/GameScreen.kt index e508657..0c63bd9 100644 --- a/core/src/me/msoucy/ptures/screens/GameScreen.kt +++ b/core/src/me/msoucy/ptures/screens/GameScreen.kt @@ -3,7 +3,6 @@ package me.msoucy.ptures.screens import com.badlogic.gdx.Gdx import com.badlogic.gdx.Input import com.badlogic.gdx.graphics.OrthographicCamera -import com.badlogic.gdx.graphics.Texture import com.badlogic.gdx.math.MathUtils import com.badlogic.gdx.math.Rectangle import com.badlogic.gdx.math.Vector3 @@ -12,14 +11,18 @@ import com.badlogic.gdx.utils.TimeUtils import ktx.app.KtxScreen import ktx.collections.iterate import ktx.graphics.use -import me.msoucy.ptures.PTures +import ktx.log.logger +import me.msoucy.ptures.* + +private val log = logger() class GameScreen(val game: PTures) : KtxScreen { - private val dropImage = Texture(Gdx.files.internal("images/drop.png")) - private val bucketImage = Texture(Gdx.files.internal("images/bucket.png")) - private val dropSound = Gdx.audio.newSound(Gdx.files.internal("sounds/drop.wav")) - private val rainMusic = Gdx.audio.newMusic(Gdx.files.internal("music/rain.mp3")).apply { isLooping = true } + private val dropImage = game.assets[TextureAtlasAssets.Game].findRegion("drop") + private val bucketImage = game.assets[TextureAtlasAssets.Game].findRegion("bucket") + private val dropSound = game.assets[SoundAssets.Drop] + private val rainMusic = game.assets[MusicAssets.Rain].apply { isLooping = true } + // The camera ensures we can render using our target resolution of 800x480 // pixels no matter what the screen resolution is. private val camera = OrthographicCamera().apply { setToOrtho(false, 800f, 480f) } @@ -75,8 +78,10 @@ class GameScreen(val game: PTures) : KtxScreen { // effect also raindrops.iterate { raindrop, iterator -> raindrop.y -= 200 * delta - if (raindrop.y + 64 < 0) + if (raindrop.y + 64 < 0) { iterator.remove() + log.debug { "Missed a raindrop!" } + } if (raindrop.overlaps(bucket)) { dropsGathered++ @@ -91,11 +96,4 @@ class GameScreen(val game: PTures) : KtxScreen { rainMusic.play() spawnRaindrop() } - - override fun dispose() { - dropImage.dispose() - bucketImage.dispose() - dropSound.dispose() - rainMusic.dispose() - } } \ No newline at end of file diff --git a/core/src/me/msoucy/ptures/screens/LoadingScreen.kt b/core/src/me/msoucy/ptures/screens/LoadingScreen.kt new file mode 100644 index 0000000..99fb926 --- /dev/null +++ b/core/src/me/msoucy/ptures/screens/LoadingScreen.kt @@ -0,0 +1,43 @@ +package me.msoucy.ptures.screens + +import com.badlogic.gdx.Gdx +import com.badlogic.gdx.graphics.OrthographicCamera +import ktx.app.KtxScreen +import ktx.graphics.use +import me.msoucy.ptures.* + +class LoadingScreen(val game: PTures) : KtxScreen { + private val camera = OrthographicCamera().apply { + setToOrtho(false, 800f, 480f) + } + + override fun render(delta: Float) { + // Continue loading assets + game.assets.update() + + camera.update() + game.batch.projectionMatrix = camera.combined + + game.batch.use { + game.font.draw(it, "Welcome to Drop!!! ", 100f, 150f) + if (game.assets.isFinished) { + game.font.draw(it, "Tap anywhere to begin!", 100f, 100f) + } else { + game.font.draw(it, "Loading assets...", 100f, 100f) + } + } + + if (Gdx.input.isTouched && game.assets.isFinished) { + game.addScreen(GameScreen(game)) + game.setScreen() + game.removeScreen() + dispose() + } + } + + override fun show() { + MusicAssets.values().forEach { game.assets.load(it) } + SoundAssets.values().forEach { game.assets.load(it) } + TextureAtlasAssets.values().forEach { game.assets.load(it) } + } +} \ No newline at end of file diff --git a/core/src/me/msoucy/ptures/screens/MainMenuScreen.kt b/core/src/me/msoucy/ptures/screens/MainMenuScreen.kt deleted file mode 100644 index 2b21f57..0000000 --- a/core/src/me/msoucy/ptures/screens/MainMenuScreen.kt +++ /dev/null @@ -1,30 +0,0 @@ -package me.msoucy.ptures.screens - -import com.badlogic.gdx.Gdx -import com.badlogic.gdx.graphics.OrthographicCamera -import ktx.app.KtxScreen -import ktx.graphics.use -import me.msoucy.ptures.PTures - -class MainMenuScreen(val game: PTures) : KtxScreen { - private val camera = OrthographicCamera().apply { - setToOrtho(false, 800f, 480f) - } - - override fun render(delta: Float) { - camera.update() - game.batch.projectionMatrix = camera.combined - - game.batch.use { - game.font.draw(it, "Welcome to Drop!!! ", 100f, 150f) - game.font.draw(it, "Tap anywhere to begin!", 100f, 100f) - } - - if (Gdx.input.isTouched) { - game.addScreen(GameScreen(game)) - game.setScreen() - game.removeScreen() - dispose() - } - } -} \ No newline at end of file diff --git a/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt b/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt index 2fac773..bdeaa00 100644 --- a/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt +++ b/desktop/src/me/msoucy/ptures/desktop/DesktopLauncher.kt @@ -1,5 +1,6 @@ package me.msoucy.ptures.desktop +import com.badlogic.gdx.Application import com.badlogic.gdx.backends.lwjgl.LwjglApplication import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration import me.msoucy.ptures.PTures @@ -7,7 +8,11 @@ import me.msoucy.ptures.PTures object DesktopLauncher { @JvmStatic fun main(arg: Array) { - val config = LwjglApplicationConfiguration() - LwjglApplication(PTures(), config) + val config = LwjglApplicationConfiguration().apply { + title = "Drop" + width = 800 + height = 480 + } + LwjglApplication(PTures(), config).logLevel = Application.LOG_DEBUG } }