Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is libgdx usable for 2d games? [closed]

Does anyone have experiences with libgdx that it works good with 2d graphics? I'm planning to use it for an Android/windows game, but i'm not sure if it's a good choise if i'm making a 2d game. Is there maybe a better 2d graphics solution you could recomend?

like image 560
user717572 Avatar asked Apr 26 '12 14:04

user717572


People also ask

Is libGDX good for 2D games?

libgdx works great for 2D. You can just use SpriteBatch if you all you want from libgdx is to draw on the screen. If you want a little more structure (you probably do), you can also work with the 2D scene graph, scene2d.

Is libGDX good?

Over the years, libGDX and its community matured: nowadays, libGDX is a well proven and reliable framework with a sound base and documentation. Furthermore, there are plenty of games built on top of libGDX, many of which are open source.

Is libGDX royalty free?

It's free and royalty-free, which is good unlike Unity, and it's on Java so it's relatively fast.


1 Answers

libgdx works great for 2D. You can just use SpriteBatch if you all you want from libgdx is to draw on the screen. If you want a little more structure (you probably do), you can also work with the 2D scene graph, scene2d. When using scene2d, you create Actors and add them to the Stage, and then libgdx calls their update, draw, and touchevent functions for you.

libgdx also includes scene2dui for your menus, and it's based on the same scene graph (buttons are subclassed from Actor, etc).

For help getting started with scene2d, I found this really helpful: http://steigert.blogspot.com/2012/02/1-libgdx-tutorial-introduction.html

And last but not least, if you're looking to develop for Android and the desktop, there's no better way to go than libgdx because libgdx does this out of the box. (Note that this also makes development so much easier since you don't have to run your app through the emulator or a device for every little test run.)

EDIT: updated links

like image 193
Steve Blackwell Avatar answered Sep 19 '22 19:09

Steve Blackwell