Switching to Libgdx

Lately I've been playing around with another game dev framework, Libgdx, and so far I love it... so I think I'll stick with it. Here are some of the features covered by Libgdx : OpenGL wrappers, sprites, atlases, fonts, particles, math utilities, physics engine, TMX tilemap support,... For a detailed list, see here. As you can see, it is a very complete and flexible framework. In this post I'll explain what makes it stand out from the others.

Libgdx is based on Java, and just like Cocos, it is designed for cross-platform development. First you have Windows/Linux/OSX support, obviously, because it's Java all you need on a desktop is to have the JRE installed and then you can run whatever Java application you like. But Libgdx also allows you to build your game for Android, iOS, and in HTML5. Personally I haven't tried out the last 2 options, so I can't say much about that. Right now I'm just focusing on desktops and android devices, and for that specific use, Libgdx does a great job. It's simple, and neat. To get started you only need one IDE -in my case it's Eclipse from the ADT bundle- and creating a new project is a piece of cake: you just have to include some jars, or generate a new project automatically with this little app. For debugging you can run your game directly on your desktop, which is much faster than having to run it on a virtual or actual android device, and when comes the time to test it on the android device, it only takes 2 clicks. So, yeah, altogether the development process is made very smooth, and I enjoyed it even more after all the setting-up that was needed with Cocos2d-x.
Last but not least, the documentation is great. The javadocs are helpful since they are thorough, the wiki is up-to-date, the tutorials are coherent, and the community is very active. In fact it is so active that the project is progressing very quickly, with the only downside being the api is modified very often, and on very essential features (like event handling), which makes your code harder to maintain. As a result, on most tutorials the code is obsolete, but hopefully every release contains working samples and demos, which are more than enough to observe and learn how it works.
Goodbye Cocos!

No comments:

Post a Comment