I had initially started development using Android and OpenGL ES using straightforward Java. But quickly ran into responsiveness issues due to naive use of Collections and the automatic garbage collector. After reading around the subject I stumbled onto libGDX (as mentioned in the previous post) and decided to start afresh. The library as a whole I found to be very straightforward to use. Great tools for setting up the initial projects. Excellent and expansive documentation for the API and cookbooks for actually making use of the library in your own application.

Planetkillers

The result is a 2D game inspired by the arcade games played in my youth – The likes of Space Invaders, Silkworm and Missile Command to name a few.

Concept

The general concept is a sort of steampunk or more Wellsian-era battle of primitive weaponry versus vastly superior technology. “Bows and arrows against the lightning!”. You are in control of a train (Class A4 inspired) racing across the country whilst using the artillery cannon to shoot the aliens before they bomb you or make it to the other side of the screen.

Sprites

All of the graphics and sprites were drawn using InkScape – a free vector graphics package. Although they were loaded into the game as PNGs (with alpha). This gives some future proofing for devices with much greater resolution screens. Ideally there would be a nice way to render SVG images directly in-game.

Code

The libGDX setup tools produce everything you need to get started provided you have already installed the Eclipse IDE (with the ADT plugins and Android SDKs). The tutorials again are top-notch. The game can be executed as a desktop application, an Android application, a browser application or if you have suitable tools as an iOS application.

The resultant game is quite snappy, although there are still areas that can be better optimised (to make better use of the libGDX library) and optimise the graphics to be device resolution-specific.

The AI might also be a little too hard too soon for some lesser-skilled players. See how you get on.