"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)

Monday, 17 October 2016

LibGDX: The “Swiss Army Knife” of Java Games Programming


My few readers might remember I sometimes explore, and play with, game engines and libraries. I suppose it's a sort of “compensation” for my everyday work with not-so-exciting middle-ware and web-services projects. I already posted about Slick2D libraries for Java games but I was looking for something more complete and, most of all, that would allow me to develop also Android applications.
LibGDX is a Java game-engine that provide a vast variety of features for developing games. It's mostly aimed to 2D games development but it even provides some 3D features. In addition LibGDX can deploy games on different platforms like Java desktop or Applet, Android, HTML5 and IOS (with some extra requirement due to peculiar Apple developing policies). Last but not least a LibGDX project can include additional extension libraries helping to develop different aspects of game programming like AI, physics or networking (and this is the why of this post title).

First project creation

You don't have to download the whole LibGDX project in order to start to develop. LibGDX people suggest using the handy utility they provide, LibGDX Project Setup, in order to generate a skeleton project. The generated project will be based on the Gradle building tool that will think about downloading from the Internet all needed libraries and their dependencies.