$30 off During Our Annual Pro Sale. View Details »

Beat the high-score: build a game using libGDX and Kotlin

David
October 04, 2018

Beat the high-score: build a game using libGDX and Kotlin

Playing games is fun but making games is even better, especially with Kotlin and libGDX. Let's build together a breakout game and let's explore the gaming framework libGDX.

This session will show some libGDX's concepts: how to draw and animate elements of our game, how collision system works to destroy our bricks, what Kotlin brings to libGDX. Then we will dive into more advanced topics like shaders, in order to handle pixels from our images. Why are we doing all of this? To break the high score, of course!

Code: https://github.com/dwursteisen/beat-the-high-score
Game: https://play.google.com/store/apps/details?id=com.github.dwursteisen.beat
Video: https://www.youtube.com/watch?v=kDxerDYelLs

(KotlinConf 2018 - 4th October 2018 - Amsterdam)

David

October 04, 2018
Tweet

More Decks by David

Other Decks in Programming

Transcript

  1. Build a game using libGDX and Kotlin
    Build a game using libGDX and Kotlin
    Build a game using libGDX and Kotlin
    Build a game using libGDX and Kotlin
    Beat the High score
    Beat the High score
    Build a game using libGDX and Kotlin

    View Slide

  2. -Gilles Allain
    In a farm… far, far away…

    View Slide

  3. -Gilles Allain
    a sneaky fox appears in the darkness of the night.

    View Slide

  4. View Slide

  5. -Gilles Allain
    In a mighty move, he stole all the chickens of the farm...

    View Slide

  6. View Slide

  7. -Gilles Allain
    those chickens were our...friends.

    View Slide

  8. -Gilles Allain
    the same night, a thunder strikes you!

    View Slide

  9. View Slide

  10. -Gilles Allain
    ...this strike have given you powers to bring back...
    ...our friends!

    View Slide

  11. David
    Wursteisen

    View Slide

  12. View Slide

  13. View Slide

  14. John Carmack

    View Slide

  15. View Slide

  16. View Slide

  17. Rota Pong

    View Slide

  18. Wiz 

    The Wizard

    View Slide

  19. Beat 

    The High 

    Score

    View Slide

  20. Game engines

    View Slide

  21. View Slide


  22. View Slide

  23. Pavel Quest
    Destroy Blocks
    Mirage Realms

    View Slide

  24. Hair Dash - http://cleancutgames.com/

    View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. Core
    iOS
    GWT
    Android
    Desktop


    View Slide

  29. dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    compile "io.github.libktx:ktx-ashley:$ktxVersion"
    compile "io.github.libktx:ktx-graphics:$ktxVersion"
    compile "io.github.libktx:ktx-scene2d:$ktxVersion"
    compile "io.github.libktx:ktx-log:$ktxVersion"
    compile "com.github.dwursteisen.libgdx-addons:aseprite-addons:$libgdx_addons"
    compile "com.github.dwursteisen.libgdx-addons:ashley-addons:$libgdx_addons"
    compile "com.strongjoshua:libgdx-inGameConsole:$console"
    }

    View Slide

  30. dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    compile "io.github.libktx:ktx-ashley:$ktxVersion"
    compile "io.github.libktx:ktx-graphics:$ktxVersion"
    compile "io.github.libktx:ktx-scene2d:$ktxVersion"
    compile "io.github.libktx:ktx-log:$ktxVersion"
    compile "com.github.dwursteisen.libgdx-addons:aseprite-addons:$libgdx_addons"
    compile "com.github.dwursteisen.libgdx-addons:ashley-addons:$libgdx_addons"
    compile "com.strongjoshua:libgdx-inGameConsole:$console"
    }

    View Slide

  31. dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    compile "io.github.libktx:ktx-ashley:$ktxVersion"
    compile "io.github.libktx:ktx-graphics:$ktxVersion"
    compile "io.github.libktx:ktx-scene2d:$ktxVersion"
    compile "io.github.libktx:ktx-log:$ktxVersion"
    compile "com.github.dwursteisen.libgdx-addons:aseprite-addons:$libgdx_addons"
    compile "com.github.dwursteisen.libgdx-addons:ashley-addons:$libgdx_addons"
    compile "com.strongjoshua:libgdx-inGameConsole:$console"
    }

    View Slide

  32. dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    compile "io.github.libktx:ktx-ashley:$ktxVersion"
    compile "io.github.libktx:ktx-graphics:$ktxVersion"
    compile "io.github.libktx:ktx-scene2d:$ktxVersion"
    compile "io.github.libktx:ktx-log:$ktxVersion"
    compile "com.github.dwursteisen.libgdx-addons:aseprite-addons:$libgdx_addons"
    compile "com.github.dwursteisen.libgdx-addons:ashley-addons:$libgdx_addons"
    compile "com.strongjoshua:libgdx-inGameConsole:$console"
    }

    View Slide

  33. dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    compile "io.github.libktx:ktx-ashley:$ktxVersion"
    compile "io.github.libktx:ktx-graphics:$ktxVersion"
    compile "io.github.libktx:ktx-scene2d:$ktxVersion"
    compile "io.github.libktx:ktx-log:$ktxVersion"
    compile "com.github.dwursteisen.libgdx-addons:aseprite-addons:$libgdx_addons"
    compile "com.github.dwursteisen.libgdx-addons:ashley-addons:$libgdx_addons"
    compile "com.strongjoshua:libgdx-inGameConsole:$console"
    }

    View Slide

  34. Let’s make a game!

    View Slide

  35. public void render(float delta) {

    movePlayer(delta);

    moveEnemies(delta);

    moveWorld(delta);


    renderWorld();

    renderEnemies();

    renderPlayer();

    }

    View Slide

  36. public void render(float delta) {

    movePlayer(delta);

    moveEnemies(delta);

    moveWorld(delta);


    renderWorld();

    renderEnemies();

    renderPlayer();

    }

    View Slide

  37. public void render(float delta) {

    movePlayer(delta);

    moveEnemies(delta);

    moveWorld(delta);


    renderWorld();

    renderEnemies();

    renderPlayer();

    }

    View Slide

  38. public void render(float delta) {

    movePlayer(delta);

    moveEnemies(delta);

    moveWorld(delta);


    renderWorld();

    renderEnemies();

    renderPlayer();

    }
    60x

    seconds

    View Slide

  39. View Slide

  40. class MyScreen : ScreenAdapter() {
    lateinit var batch: SpriteBatch
    override fun create() {
    batch = SpriteBatch()
    }
    override fun render() {
    batch.begin()
    batch.draw(image, x, y)
    batch.end()
    }
    }

    View Slide

  41. class MyScreen : ScreenAdapter() {
    lateinit var batch: SpriteBatch
    override fun create() {
    batch = SpriteBatch()
    }
    override fun render() {
    batch.begin()
    batch.draw(image, x, y)
    batch.end()
    }
    }

    View Slide

  42. class MyScreen : ScreenAdapter() {
    lateinit var batch: SpriteBatch
    override fun create() {
    batch = SpriteBatch()
    }
    override fun render() {
    batch.begin()
    batch.draw(image, x, y)
    batch.end()
    }
    }

    View Slide

  43. class MyScreen : ScreenAdapter() {
    lateinit var batch: SpriteBatch
    override fun create() {
    batch = SpriteBatch()
    }
    override fun render() {
    batch.begin()
    batch.draw(image, x, y)
    batch.end()
    }
    }

    View Slide

  44. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render() {
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x, y, radius)
    batch.end()
    }
    }

    View Slide

  45. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render() {
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x, y, radius)
    batch.end()
    }
    }

    View Slide

  46. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render() {
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x, y, radius)
    batch.end()
    }
    }

    View Slide

  47. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render() {
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x, y, radius)
    batch.end()
    }
    }

    View Slide

  48. class MyScreen : ScreenAdapter() {
    lateinit var batch: SpriteBatch
    override fun create() {
    batch = SpriteBatch()
    }
    override fun render() {
    batch.begin()
    batch.draw(image, x, y)
    batch.end()
    }
    }

    View Slide

  49. class MyScreen : KtxScreen {
    val batch: SpriteBatch = SpriteBatch()
    override fun render() {
    batch.use {
    it.draw(sprite, x, y)
    }
    }
    }
    Inherit

    View Slide

  50. (0,0)
    x
    y

    View Slide

  51. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    position.add(0f, -0.5f)
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(position.x, position.y, radius)
    batch.end()
    }
    }

    View Slide

  52. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    position.add(0f, -0.5f)
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(position.x, position.y, radius)
    batch.end()
    }
    }

    View Slide

  53. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    position.add(0f, -0.5f)
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(position.x, position.y, radius)
    batch.end()
    }
    }

    View Slide

  54. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    position.add(0f, -0.5f)
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(position.x, position.y, radius)
    batch.end()
    }
    }

    View Slide

  55. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    private var time: Float = 0f
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    val (x, y) = position
    time += delta
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x + MathUtils.cos(time), y, radius)
    batch.end()
    }
    }

    View Slide

  56. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    private var time: Float = 0f
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    val (x, y) = position
    time += delta
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x + MathUtils.cos(time), y, radius)
    batch.end()
    }
    }

    View Slide

  57. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    private var time: Float = 0f
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    val (x, y) = position
    time += delta
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x + MathUtils.cos(time), y, radius)
    batch.end()
    }
    }

    View Slide

  58. class MyScreen : ScreenAdapter() {
    lateinit var batch: ShapeRenderer
    private val position: Vector2 = Vector2(0f, 0f)
    private var time: Float = 0f
    override fun create() {
    batch = ShapeRenderer()
    }
    override fun render(delta: Float) {
    val (x, y) = position
    time += delta
    batch.begin(ShapeRenderer.ShapeType.Filled)
    batch.color = Color.CHARTREUSE
    batch.circle(x + MathUtils.cos(time), y, radius)
    batch.end()
    }
    }

    View Slide

  59. /**
    * Operator function that allows to deconstruct this vector.
    * @return X component.
    */
    operator fun Vector2.component1(): Float = this.x
    /**
    * Operator function that allows to deconstruct this vector.
    * @return Y component.
    */
    operator fun Vector2.component2(): Float = this.y
    val vector = Vector2(45f, 50f)
    val (x, y) = vector

    View Slide

  60. /**
    * Operator function that allows to deconstruct this vector.
    * @return X component.
    */
    operator fun Vector2.component1(): Float = this.x
    /**
    * Operator function that allows to deconstruct this vector.
    * @return Y component.
    */
    operator fun Vector2.component2(): Float = this.y
    val (x, y) = Vector2(45f, 50f)

    View Slide

  61. entity.add(Ball())
    .add(Position(Vector2(-100f, -100f)))
    .add(Size(Vector2(8f, 9f)))
    .add(Rotation(Vector2(4f, 4f)))

    View Slide

  62. entity.add(Ball())
    .add(Position(Vector2(-100f, -100f)))
    .add(Size(Vector2(8f, 9f)))
    .add(Rotation(Vector2(4f, 4f)))

    View Slide

  63. entity.add(Ball())
    .add(Position(-100 v2 -100f))
    .add(Size(8 v2 9))
    .add(Rotation(4 v2 4))
    Create a 

    new Vector2
    infix fun Number.v2(other: Number): Vector2 {
    return Vector2(this.toFloat(), other.toFloat())
    }

    View Slide

  64. Math: back to school

    View Slide

  65. View Slide

  66. Side
    Racket
    Ball

    View Slide

  67. Racket
    Side
    Side
    Ball

    View Slide

  68. Racket
    Side
    Side
    Ball dx = dx * -1

    View Slide

  69. Racket
    Side
    Side
    Ball dx = dx * -1

    View Slide

  70. Racket
    Side
    Side
    Ball
    Alpha
    dy = dy * -1 * alpha
    dx = dx * alpha

    View Slide

  71. val alpha = Math.abs(ball.x - raquet.x)
    val direction: Vector2 = Vector2(10f, 20f)
    direction.scl(1f, -1f)
    .scl(alpha)
    .nor()
    .rotate(306f)
    .add(10f, 20f)

    View Slide

  72. val ball = Rectangle(68f, 64f, 5f, 5f)
    val player = Rectangle(64f, 64f, 100f, 10f)
    // the ball hit the player?
    player.overlaps(ball)

    View Slide

  73. val ball = Rectangle(68f, 64f, 5f, 5f)
    val player = Rectangle(64f, 64f, 100f, 10f)
    // the ball hit the player?
    player.overlaps(ball)

    View Slide

  74. val ball = Rectangle(68f, 64f, 5f, 5f)
    val player = Rectangle(64f, 64f, 100f, 10f)
    // the ball hit the player?
    player.overlaps(ball)

    View Slide

  75. View Slide

  76. View Slide

  77. View Slide

  78. Box2D

    View Slide

  79. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()

    View Slide

  80. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()
    Gravity

    View Slide

  81. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()

    View Slide

  82. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()
    Configuration of the
    « thing »

    View Slide

  83. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()

    View Slide

  84. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()

    View Slide

  85. var world = World(Vector2(0, -10), true)
    // ...
    // Do in render method
    world.step(1/60f, 6, 2);
    val bodyDef = BodyDef()
    // Set its world position
    bodyDef.position.set(position.x, position.y)
    bodyDef.type = BodyDef.BodyType.DynamicBody
    bodyDef.angle = 0f
    val body = world.createBody(bodyDef)
    val shape = CircleShape()
    shape.radius = 8f
    // 2. Create a FixtureDef, as usual.
    val fd = FixtureDef()
    fd.density = 1f
    fd.friction = 2f
    fd.shape = shape
    body.createFixture(fd)
    body.userData = Any // attach sprite data
    shape.dispose()

    View Slide

  86. Traversable

    View Slide

  87. Math: Interpolation

    View Slide

  88. View Slide

  89. View Slide

  90. View Slide

  91. y = Interpolation.bounceOut.apply(time) * 100f
    Non linear
    Should be a
    percentage (0..1)
    y will go from 0 to 100

    View Slide

  92. The screen, the viewport 

    and the camera

    View Slide

  93. Game
    screen
    screen
    screen screen screen

    View Slide

  94. open class MenuScreen(val game: Game) : ScreenAdapter() {
    override fun render(delta: Float) {
    // clear the screen
    Gdx.gl.glClearColor(0f, 0f, 0f, 1f)
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
    batch.begin()
    // ...
    batch.end()
    if (goToMenu) {
    game.setScreen(menuScreen)
    }
    }
    }

    View Slide

  95. open class MenuScreen(val game: Game) : ScreenAdapter() {
    override fun render(delta: Float) {
    // clear the screen
    Gdx.gl.glClearColor(0f, 0f, 0f, 1f)
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
    batch.begin()
    // ...
    batch.end()
    if (goToMenu) {
    game.setScreen(menuScreen)
    }
    }
    }
    ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠
    game.setScreen(screen) 

    is not the same that

    game.screen = screen
    ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠

    View Slide

  96. View Slide

  97. View Slide

  98. View Slide

  99. class MyScreen : ScreenAdapter() {
    private lateinit var viewport: Viewport
    private lateinit var bath: SpriteBatch
    override fun show() {
    viewport = FitViewport(200f, 200f)
    bath = SpriteBath()
    }
    override fun render(delta: Float) {
    Gdx.gl.glClearColor(91f / 256f, 110f / 256f, 225f / 256f, 1f)
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
    batch.begin()
    batch.projectionMatrix = viewport.camera.combined
    // render
    batch.end()
    }
    override fun resize(width: Int, height: Int) {
    viewport.update(width, height)
    }
    }

    View Slide

  100. class MyScreen : ScreenAdapter() {
    private lateinit var viewport: Viewport
    private lateinit var bath: SpriteBatch
    override fun show() {
    viewport = FitViewport(200f, 200f)
    bath = SpriteBath()
    }
    override fun render(delta: Float) {
    Gdx.gl.glClearColor(91f / 256f, 110f / 256f, 225f / 256f, 1f)
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
    batch.begin()
    batch.projectionMatrix = viewport.camera.combined
    // render
    batch.end()
    }
    override fun resize(width: Int, height: Int) {
    viewport.update(width, height)
    }
    }
    Size of the world you’ll
    display on the screen

    View Slide

  101. class MyScreen : ScreenAdapter() {
    private lateinit var viewport: Viewport
    private lateinit var bath: SpriteBatch
    override fun show() {
    viewport = FitViewport(200f, 200f)
    bath = SpriteBath()
    }
    override fun render(delta: Float) {
    Gdx.gl.glClearColor(91f / 256f, 110f / 256f, 225f / 256f, 1f)
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
    batch.begin()
    batch.projectionMatrix = viewport.camera.combined
    // render
    batch.end()
    }
    override fun resize(width: Int, height: Int) {
    viewport.update(width, height)
    }
    }

    View Slide

  102. View Slide

  103. ScreenViewport

    View Slide

  104. StretchViewport

    View Slide

  105. FitViewport
    Clear this
    zone
    Clear this
    zone

    View Slide

  106. FillViewport

    View Slide

  107. ExtendViewport
    Displaying
    this zone

    View Slide

  108. View Slide

  109. View Slide

  110. viewport.camera.position.add(0f, 40f, 0f)
    // Recalculates the projection and
    // view matrix of this camera
    // Use this after you've manipulated any of
    // the attributes of the camera.
    viewport.camera.update()
    viewport.camera.rotate(10f, 0f, 0f, 1f)
    viewport.camera.update()

    View Slide

  111. viewport.camera.position.add(0f, 40f, 0f)
    // Recalculates the projection and
    // view matrix of this camera
    // Use this after you've manipulated any of
    // the attributes of the camera.
    viewport.camera.update()
    viewport.camera.rotate(10f, 0f, 0f, 1f)
    viewport.camera.update()
    Will move the camera up

    View Slide

  112. viewport.camera.position.add(0f, 40f, 0f)
    // Recalculates the projection and
    // view matrix of this camera
    // Use this after you've manipulated any of
    // the attributes of the camera.
    viewport.camera.update()
    viewport.camera.rotate(10f, 0f, 0f, 1f)
    viewport.camera.update()
    Rotate the camera on the z Axis

    View Slide

  113. Around the game

    View Slide

  114. View Slide

  115. View Slide

  116. // load texture
    val texture = Texture(Gdx.files.internal("texture.png"))
    val split = TextureRegion.split(texture, 128, 128)
    // select frames
    val frames = Array()
    frames.add(split[0][0])
    frames.add(split[0][1])
    frames.add(split[0][2])
    frames.add(split[0][4])
    // create animation
    val animation = Animation(100f, frames)
    // select frame to draw
    val keyToRender = animation.getKeyFrame(time)

    View Slide

  117. // load texture
    val texture = Texture(Gdx.files.internal("texture.png"))
    val split = TextureRegion.split(texture, 128, 128)
    // select frames
    val frames = Array()
    frames.add(split[0][0])
    frames.add(split[0][1])
    frames.add(split[0][2])
    frames.add(split[0][4])
    // create animation
    val animation = Animation(100f, frames)
    // select frame to draw
    val keyToRender = animation.getKeyFrame(time)

    View Slide

  118. // load texture
    val texture = Texture(Gdx.files.internal("texture.png"))
    val split = TextureRegion.split(texture, 128, 128)
    // select frames
    val frames = Array()
    frames.add(split[0][0])
    frames.add(split[0][1])
    frames.add(split[0][2])
    frames.add(split[0][4])
    // create animation
    val animation = Animation(100f, frames)
    // select frame to draw
    val keyToRender = animation.getKeyFrame(time)

    View Slide

  119. // load texture
    val texture = Texture(Gdx.files.internal("texture.png"))
    val split = TextureRegion.split(texture, 128, 128)
    // select frames
    val frames = com.badlogic.gdx.utils.Array()
    frames.add(split[0][0])
    frames.add(split[0][1])
    frames.add(split[0][2])
    frames.add(split[0][4])
    // create animation
    val animation = Animation(100f, frames)
    // select frame to draw
    val keyToRender = animation.getKeyFrame(time)
    import com.badlogic.gdx.utils.Array as GdxArray

    View Slide

  120. // load texture
    val texture = Texture(Gdx.files.internal("texture.png"))
    val split = TextureRegion.split(texture, 128, 128)
    // select frames
    val frames = GdxArray()
    frames.add(split[0][0])
    frames.add(split[0][1])
    frames.add(split[0][2])
    frames.add(split[0][4])
    // create animation
    val animation = Animation(100f, frames)
    // select frame to draw
    val keyToRender = animation.getKeyFrame(time)

    View Slide

  121. // load texture
    val texture = Texture(Gdx.files.internal("texture.png"))
    val split = TextureRegion.split(texture, 128, 128)
    // select frames
    val frames = GdxArray()
    frames.add(split[0][0])
    frames.add(split[0][1])
    frames.add(split[0][2])
    frames.add(split[0][4])
    // create animation
    val animation = Animation(100f, frames)
    // select frame to draw
    val keyToRender = animation.getKeyFrame(time)
    Duration per frame

    View Slide

  122. 100ms 100ms 100ms 100ms

    View Slide

  123. 800ms 100ms 100ms 100ms
    100ms
    100ms
    100ms
    100ms
    100ms
    100ms
    100ms

    View Slide

  124. Loading…

    View Slide

  125. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture = assetsManager.get("player.png", Texture::class.java)

    View Slide

  126. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture = assetsManager.get("player.png", Texture::class.java)

    View Slide

  127. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture = assetsManager.get("player.png", Texture::class.java)

    View Slide

  128. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture = assetsManager.get("player.png", Texture::class.java)

    View Slide

  129. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture = assetsManager.get("player.png", Texture::class.java)
    Call it in the render method

    View Slide

  130. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture = assetsManager.get("player.png", Texture::class.java)

    View Slide

  131. val assetsManager = AssetManager()
    assetsManager.load("player.png", Texture::class.java)
    assetsManager.load("sfx/beat_intro.ogg", Music::class.java)
    assetsManager.load("krungthep2.fnt", BitmapFont::class.java)
    assetsManager.load("sheets/intro", Aseprite::class.java)
    // call it until it's loaded
    val isLoaded = assetsManager.update()
    val texture: Texture = assetsManager["player.png"]
    inline operator fun AssetManager.get(filename: String): T {
    return this.get(filename, T::class.java)
    }

    View Slide

  132. Scrollpane
    Label
    Button
    Select box

    View Slide

  133. val scene = verticalGroup {
    setFillParent(true)
    pad(10f)
    label("Hello KotlinConf!")
    horizontalGroup {
    textButton("Click On Me")
    label("<-- here")
    }
    label("Another label...")
    selectBoxOf(GdxArray().apply {
    add("value 1")
    add("value 2")
    add("value 3")
    })
    }
    stage = Stage(FitViewport(screenWidth, screenHeight))
    stage.addActor(scene)

    View Slide

  134. val scene = verticalGroup {
    setFillParent(true)
    pad(10f)
    label("Hello KotlinConf!")
    horizontalGroup {
    textButton("Click On Me")
    label("<-- here")
    }
    label("Another label...")
    selectBoxOf(GdxArray().apply {
    add("value 1")
    add("value 2")
    add("value 3")
    })
    }
    stage = Stage(FitViewport(screenWidth, screenHeight))
    stage.addActor(scene)

    View Slide

  135. val scene = verticalGroup {
    setFillParent(true)
    pad(10f)
    label("Hello KotlinConf!")
    horizontalGroup {
    textButton("Click On Me")
    label("<-- here")
    }
    label("Another label...")
    selectBoxOf(GdxArray().apply {
    add("value 1")
    add("value 2")
    add("value 3")
    })
    }
    stage = Stage(FitViewport(screenWidth, screenHeight))
    stage.addActor(scene)

    View Slide

  136. val scene = verticalGroup {
    setFillParent(true)
    pad(10f)
    label("Hello KotlinConf!")
    horizontalGroup {
    textButton("Click On Me")
    label("<-- here")
    }
    label("Another label...")
    selectBoxOf(GdxArray().apply {
    add("value 1")
    add("value 2")
    add("value 3")
    })
    }
    stage = Stage(FitViewport(screenWidth, screenHeight))
    stage.addActor(scene)

    View Slide

  137. Entity System

    View Slide

  138. Position
    Animation
    Player
    State

    View Slide

  139. val player = Entity()
    player.add(Player()))
    player.add(Position(100 v2 100))
    player.add(Animation("idle"))
    player.add(StateComponent())
    Position
    Animation
    Player
    State

    View Slide

  140. ComponentMapper player = ComponentMapper.getFor(Player.class);
    ComponentMapper position = ComponentMapper.getFor(Position.class);
    ComponentMapper animation = ComponentMapper.getFor(Animation.class);
    ComponentMapper state = ComponentMapper.getFor(StateComponent.class);
    ...
    player.get(entity).life;
    position.get(entity).xy;
    animation.get(entity).getFrame(time);
    state.get(entity).time;
    Extractor
    Extraction

    View Slide

  141. inline fun EntitySystem.get(): ComponentMapper = 

    ComponentMapper.getFor(T::class.java)
    inline operator fun Entity.get(mapper: ComponentMapper): T = 

    mapper.get(this)

    View Slide

  142. val player: ComponentMapper = get()
    val position: ComponentMapper = get()
    val animation: ComponentMapper = get()
    val state: ComponentMapper = get()
    // access to components
    entity[player].life
    entity[position].xy
    entity[animation].frame(time)
    entity[state].time

    View Slide

  143. val player: ComponentMapper = get()
    val position: ComponentMapper = get()
    val animation: ComponentMapper = get()
    val state: ComponentMapper = get()
    // access to components
    entity[player].life
    entity[position].xy
    entity[animation].frame(time)
    entity[state].time
    Accessing like a map

    View Slide

  144. Close Open

    View Slide

  145. fun on(event: Int, block: Transition): OnState {
    var currentTransitions = parent.transitions[state] ?: emptyMap()
    currentTransitions += event to block
    parent.transitions += state to currentTransitions
    return this
    }
    Lambda

    View Slide

  146. startWith(WAIT)
    onState(WAIT).on(GameEvents.EVENT_COMPUTER_ALLOW_MOVE) { entity, event ->
    if (entity[dragon].currentTurn > 3) {
    entity[dragon].currentTurn = -1
    go(FIRE, entity, event)
    } else {
    go(MOVE, entity, event)
    }
    }
    onState(FIRE).on(GameEvents.EVENT_DRAGON_FIRE_BALL) { entity, event ->
    go(MOVE, entity, event)
    }
    Lambda

    View Slide

  147. startWith(WAIT)
    onState(WAIT).on(GameEvents.EVENT_COMPUTER_ALLOW_MOVE) { entity, event ->
    if (entity[dragon].currentTurn > 3) {
    entity[dragon].currentTurn = -1
    go(FIRE, entity, event)
    } else {
    go(MOVE, entity, event)
    }
    }
    onState(FIRE).on(GameEvents.EVENT_DRAGON_FIRE_BALL) { entity, event ->
    go(MOVE, entity, event)
    }
    State Event Transition

    View Slide

  148. Pitfalls

    View Slide

  149. Garbage Collector
    Garbage Collector
    Garbage Collector
    Garbage Collecto
    arbage C
    Garbage
    STOP THE
    WORLD

    View Slide

  150. altLayers = map.layers
    .mapIndexed { index, layer -> index to layer }
    .filter { it.second.name.startsWith("alt_") }
    .map { it.first }
    .toIntArray()
    List 1
    List 2
    List 3
    List 4
    mutableList

    View Slide

  151. val ball = Rectangle(68f, 64f, 5f, 5f)
    val player = Rectangle(64f, 64f, 100f, 10f)
    // the ball hit the player?
    player.overlaps(ball)

    View Slide

  152. val pool = object : Pool() {
    override fun newObject(): Rectangle = Rectangle()
    }
    // ...
    val ball = pool.obtain().apply {
    set(68f, 64f, 5f, 5f)
    }
    val player = pool.obtain().apply {
    set(64f, 64f, 100f, 10f)
    }
    // the ball hit the player?
    player.overlaps(ball)
    pool.free(ball)
    pool.free(player)

    View Slide

  153. val pool = object : Pool() {
    override fun newObject(): Rectangle = Rectangle()
    }
    // ...
    val ball = pool.obtain().apply {
    set(68f, 64f, 5f, 5f)
    }
    val player = pool.obtain().apply {
    set(64f, 64f, 100f, 10f)
    }
    // the ball hit the player?
    player.overlaps(ball)
    pool.free(ball)
    pool.free(player)

    View Slide

  154. val pool = object : Pool() {
    override fun newObject(): Rectangle = Rectangle()
    }
    // ...
    val ball = pool.obtain().apply {
    set(68f, 64f, 5f, 5f)
    }
    val player = pool.obtain().apply {
    set(64f, 64f, 100f, 10f)
    }
    // the ball hit the player?
    player.overlaps(ball)
    pool.free(ball)
    pool.free(player)

    View Slide

  155. val pool = object : Pool() {
    override fun newObject(): Rectangle = Rectangle()
    }
    // ...
    val ball = pool.obtain().apply {
    set(68f, 64f, 5f, 5f)
    }
    val player = pool.obtain().apply {
    set(64f, 64f, 100f, 10f)
    }
    // the ball hit the player?
    player.overlaps(ball)
    pool.free(ball)
    pool.free(player)

    View Slide

  156. Integration with other tools

    View Slide

  157. View Slide

  158. View Slide

  159. View Slide

  160. View Slide

  161. View Slide

  162. // can be loaded using AssetManager too
    val tmxMap = TmxMapLoader().load(mapName)
    tmxMap.layers["bricks"]?.objects?.forEach { brick ->
    // create game entity
    }
    mapRenderer = OrthogonalTiledMapRenderer(tmxMap)
    // render method
    mapRenderer.setView(viewport.camera as OrthographicCamera)
    mapRenderer.render()

    View Slide

  163. // can be loaded using AssetManager too
    val tmxMap = TmxMapLoader().load(mapName)
    tmxMap.layers["bricks"]?.objects?.forEach { brick ->
    // create game entity
    }
    mapRenderer = OrthogonalTiledMapRenderer(tmxMap)
    // render method
    mapRenderer.setView(viewport.camera as OrthographicCamera)
    mapRenderer.render()

    View Slide

  164. // can be loaded using AssetManager too
    val tmxMap = TmxMapLoader().load(mapName)
    tmxMap.layers["bricks"]?.objects?.forEach { brick ->
    // create game entity
    }
    mapRenderer = OrthogonalTiledMapRenderer(tmxMap)
    // render method
    mapRenderer.setView(viewport.camera as OrthographicCamera)
    mapRenderer.render()

    View Slide

  165. // can be loaded using AssetManager too
    val tmxMap = TmxMapLoader().load(mapName)
    tmxMap.layers["bricks"]?.objects?.forEach { brick ->
    // create game entity
    }
    mapRenderer = OrthogonalTiledMapRenderer(tmxMap)
    // render method
    mapRenderer.setView(viewport.camera as OrthographicCamera)
    mapRenderer.render()

    View Slide

  166. View Slide

  167. hit 4
    sound chicken.wav

    View Slide

  168. tmxMap.layers["bricks"].objects.forEach { brick ->
    val hit: Any = brick.properties["hit"]
    }
    Error prone
    Error prone

    View Slide

  169. class BrickProperties(properties: MapProperties) {
    val x: Double by properties
    val y: Double by properties
    val hit: Int by properties
    val sound: String by properties
    }
    tmxMap.layers["bricks"].objects.forEach { brick ->
    val props = BrickProperties(brick.properties)
    val hit = props.hit
    }

    View Slide

  170. class BrickProperties(properties: MapProperties) {
    val x: Double by properties
    val y: Double by properties
    val hit: Int by properties
    val sound: String by properties
    }
    tmxMap.layers["bricks"].objects.forEach { brick ->
    val props = BrickProperties(brick.properties)
    val hit = props.hit
    }

    View Slide

  171. class BrickProperties(properties: MapProperties) {
    val x: Double by properties
    val y: Double by properties
    val hit: Int by properties
    val sound: String by properties
    }
    tmxMap.layers["bricks"].objects.forEach { brick ->
    val props = BrickProperties(brick.properties)
    val hit = props.hit
    }
    Delegates

    View Slide

  172. inline operator fun MapProperties.getValue(thisRef: Any?, property: KProperty<*>): T
    {
    val asStr = this[property.name].toString()
    return when (T::class) {
    Double::class -> asStr.toDouble()
    Int::class -> asStr.toInt()
    Boolean::class -> "true" == asStr
    String::class -> asStr
    else -> this[property.name]
    } as T
    }

    View Slide

  173. val chicken: Aseprite = assets["sheets/chicken"]
    val idleAnimation: Animation = chicken["idle"]

    View Slide

  174. Json
    Json
    Json

    View Slide

  175. open class AsepriteTask : DefaultTask() {
    // ...
    @TaskAction
    fun export() {
    val exec = getExecActionFactory().newExecAction()
    val exts = project.extensions.getByType(AsepritePluginExtentions::class.java)
    val aseprite = exts.exec ?: invalideAsepritePath()
    // ...
    }
    private fun invalideAsepritePath(): Nothing {
    TODO("""Missing aseprite executable path.
    Please configure it using aseprite.exec property (ie: in your ~/.gradle/gradle.properties)
    aseprite.exec=
    or using aseprite extension in your build.gradle
    aseprite {
    exec=
    }
    MacOS specific : point to aseprite located into /Aseprite.app/Contents/MacOS/aseprite""")
    }
    }

    View Slide

  176. open class AsepriteTask : DefaultTask() {
    // ...
    @TaskAction
    fun export() {
    val exec = getExecActionFactory().newExecAction()
    val exts = project.extensions.getByType(AsepritePluginExtentions::class.java)
    val aseprite = exts.exec ?: invalideAsepritePath()
    // ...
    }
    private fun invalideAsepritePath(): Nothing {
    TODO("""Missing aseprite executable path.
    Please configure it using aseprite.exec property (ie: in your ~/.gradle/gradle.properties)
    aseprite.exec=
    or using aseprite extension in your build.gradle
    aseprite {
    exec=
    }
    MacOS specific : point to aseprite located into /Aseprite.app/Contents/MacOS/aseprite""")
    }
    }
    What happens if null?
    Encountered an error, lol!

    View Slide

  177. open class AsepriteTask : DefaultTask() {
    // ...
    @TaskAction
    fun export() {
    val exec = getExecActionFactory().newExecAction()
    val exts = project.extensions.getByType(AsepritePluginExtentions::class.java)
    val aseprite = exts.exec ?: invalideAsepritePath()
    // ...
    }
    private fun invalideAsepritePath(): Nothing {
    TODO("""Missing aseprite executable path.
    Please configure it using aseprite.exec property (ie: in your ~/.gradle/gradle.properties)
    aseprite.exec=
    or using aseprite extension in your build.gradle
    aseprite {
    exec=
    }
    MacOS specific : point to aseprite located into /Aseprite.app/Contents/MacOS/aseprite""")
    }
    }

    View Slide

  178. open class AsepriteTask : DefaultTask() {
    // ...
    @TaskAction
    fun export() {
    val exec = getExecActionFactory().newExecAction()
    val exts = project.extensions.getByType(AsepritePluginExtentions::class.java)
    val aseprite = exts.exec ?: invalideAsepritePath()
    // ...
    }
    private fun invalideAsepritePath(): Nothing {
    TODO("""Missing aseprite executable path.
    Please configure it using aseprite.exec property (ie: in your ~/.gradle/gradle.properties)
    aseprite.exec=
    or using aseprite extension in your build.gradle
    aseprite {
    exec=
    }
    MacOS specific : point to aseprite located into /Aseprite.app/Contents/MacOS/aseprite""")
    }
    }

    View Slide

  179. Shaders

    View Slide

  180. void main() {

    vec4 sum = vec4(0);


    float step = iResolution.y;

    // y

    for(float i = -area ; i <= area ; i += 1.) {

    // x

    for(float j = -area ; j <= area ; j += 1.) {

    float x = v_texCoords.x + i / iResolution.x;

    float y = v_texCoords.y + j / iResolution.y;

    sum += texture2D(u_texture, vec2(x, y)) * 0.005;

    }

    }

    gl_FragColor = texture2D(u_texture, v_texCoords) + sum;

    }
    OpenGL Shading Language (GLSL)

    View Slide

  181. View Slide

  182. View Slide

  183. View Slide

  184. View Slide

  185. View Slide

  186. View Slide

  187. View Slide

  188. View Slide

  189. View Slide

  190. if (color_pixel < cutoff) {
    // light dark
    pixel = gl_FragColor = vec4(0.3, 0.2, 0.4., 1.0);
    } else {
    pixel = color_pixel;
    }
    0
    1
    Cut off

    View Slide

  191. if (color_pixel < cutoff) {
    // light dark
    pixel = gl_FragColor = vec4(0.3, 0.2, 0.4., 1.0);
    } else {
    pixel = color_pixel;
    }

    View Slide

  192. View Slide

  193. View Slide

  194. View Slide

  195. https://www.shadertoy.com/view/ld3Gz2

    View Slide

  196. fun makeGames()

    View Slide

  197. fun makeGames()

    View Slide

  198. @dwursteisen
    http://bit.ly/2poORfk

    View Slide

  199. Beat The High Score Game https://github.com/dwursteisen/beat-the-high-score
    libGDX Lib https://libgdx.badlogicgames.com/
    KTX 

    (This is NOT Android KTX)
    Lib https://github.com/libktx/ktx/
    libGDX addons Lib https://github.com/dwursteisen/libgdx-addons/
    kTerminal Lib https://github.com/heatherhaks/kterminal
    Game Services Lib https://github.com/MrStahlfelge/gdx-gamesvcs
    In Game Console

    (A la quake)
    Lib https://github.com/StrongJoshua/libgdx-inGameConsole
    Gif Recorder Lib https://github.com/Anuken/GDXGifRecorder
    Tiled Editor Editor https://www.mapeditor.org
    Aseprite Editor https://www.aseprite.org

    View Slide