Friday, February 21, 2014

LibGDX + Box2D + Tiled

Well, it's been a while. I just finished the LibGDX Asteroids game.

I probably won't be going back to Java 2D. I said that I would try to get a LibGDX Box2D and Tiled tutorial up and running, but of course, before I start my tutorials, I need to actually have a game for it. I'm still in the process of figuring out the best way to integrate Box2D and Tiled maps.

The game I'm going to use for this future tutorial is this simple, get-to-the-end-of-the-level, platformer: GIF 1.6MB

Some of the things I want to cover in the tutorial are:
- how to use the Tiled software
- how to use the LibGDX Tiled API to read the Tiled maps
- how to use Box2D (this is the big one)
---- adding bodies to the world
---- creating and customizing fixtures
---- converting to Box2D units
---- filter collision
---- contact listeners

I got most of the main game mechanics already finished. I should have the game done soon, or at least enough of it done to start recording the tutorial.

5 comments:

  1. Where did you get the specs (resolution, asteroid size, sounds, etc) for the asteroids game? Or are you just going by memory and look.

    ReplyDelete
    Replies
    1. I looked on youtube for an original Asteroids arcade video. I just estimated.

      Delete
  2. I'm glad to read you mike because I'm on raw android-openGL now: floatBuffers, shortIndex and GL10 class. It would help me to understand better your libgdx lessons. Thanks one more time.

    ReplyDelete
    Replies
    1. I'm not really sure how much you're going to get out of my tutorials because I tend to stay away from pure OpenGL. I mean the whole point of LibGDX is so you don't have to mess with that.

      For example, SpriteBatch is way easier to use than binding and making triangle/quad vertices.

      Delete