Search code examples
javaandroid3dlibgdx2d

Resources for using LibGDX to create a basic 2D plane/world with camera movement?


I'm learning to use LibGDX in Android Studio, and have just completed this tutorial which I'd strongly recommend to other beginners. I'm trying to learn as gradually and thoroughly as possible, but I'm having trouble finding resources that would help to make this very simple project: A finite 2D plane, a camera looking down at it at an angle, and the ability to drag that plane in different directions. If my description is confusing, a good comparison would be to city builder android games such as CityVille (but just the plane and camera features).

I'm not looking for anyone to "do it for me" or anything, I'm genuinely interested in learning it thoroughly, but can't find any resources that cover this specific idea. I think it's a realistic next step based on what I've learned so far (state management, sprites, side-scrolling textures, player movement, simple animation, and collision detection). If anyone can direct me to relevant guides, tutorials, or other resources that cover this, I'd really appreciate it. Or if you think I should learn something else first, that's useful feedback as well and would appreciate it equally.


Solution

  • I am not aware of a tutorial dealing with your specific use case, but you can find tutorials that describe how to do each of those general concepts (using a camera, rendering a model, interacting with that model) illustrated on the libGDX wiki with links to both tutorials and examples on GitHub.

    This is a really good resource in general (and if you find that it doesn't cover a particular subject, you might consider popping on to the #libgdx IRC chat on irc.freenode.net and seeing how you or others can contribute to the wiki).