Libgdx setup tool now supports Ashley

gdx-setup ashley

Last night I added Ashley support to the official Libgdx setup tool. Creating Libgdx projects that use Ashley entity framework is now even easier. Simply make sure you tick the Ashley checkbox before generating your project.

By the way, if you already have a a project, adding the extra dependency is also trivial.

  • Core project: com.badlogicgames.ashley:ashley:1.0.1
  • Android project: com.badlogicgames.ashley:ashley:1.0.1
  • GWT project: com.badlogicgames.ashley:ashley:1.0.1:sources

Remember that using Ashley in non Libgdx projects is also perfectly fine.

5 years old

This blog is now a lustrum old. A few days ago I received the yearly invoice from the hosting company, curiosity kicked in and made me check the date for the first one. I was surprised to see it’s from July 2009 and thought a recap was in order.

It might have been possible to say that 5 years can make a blog be referred to as veteran… If we were in 2010. That is no longer the case. There are many blogs out there that have been delivering high quality content for over 10 years now (and beyond). However, I believe that having kept doing this all this time is something one can be proud of.

In absolute terms, the numbers are far from impressive, although they mean a lot to me. There’s some really awesome content out there, why would people spend some of their valuable time reading this? This blog has had over 300K hits! Add it to the list of unsolved mysteries. I’ve posted 235 entries, which, to be fair, it isn’t that much considering we’re talking about a 5 year span. There’s an average of 3.75 comments per entry, not a lot but decent given that a lot of the discussion has moved to social networks like Twitter.

Embarrassingly, I started writing in Spanish about films, TV shows and concerts with the assertiveness of a true connoisseur. Past me was clearly a fool. In 2010, the topic started shifting towards technology and computery stuff. Once I moved to the UK in September 2011, all articles were in English and I’d only write about programming and games development.

Currently, the most popular articles in English are:

Well, hopefully, I’ll be able to keep doing this for a lot longer.

Ashley 1.0.1 released

Finally! During the past couple of months me and a bunch of awesome collaborators have been working on a proper Ashley release and now it’s done. Here is the list of the new shiny features.

Mind that some of them break the previous API. However, this is our first official release, we’ll push hard to keep the API backwards compatible from now on.

  • Gradle: we got rid of the Eclipse projects and now use Gradle to manage our dependencies and build process.
  • Maven Central: Ashley is now available from Maven Central, which makes it dead easy for your project to depend on it. In Gradle, add the following dependency: compile "com.badlogicgames.ashley:ashley:1.0.1".
  • Jenkins build: Mario kindly offered us some server time to make sure Ashley is always stable.
  • Unit tests: there are unit tests for pretty much every component in Ashley. They are run after every commit by our Jenkins job.
  • Immutable collections: core Ashley classes now return ImmutableArray and ImmutableIntMap references, making it harder for client code to break the system.
  • Family filtering: now we get the collection of entities that have a set of components, have at least one component from a given set and do not have a single component from another given set.
  • GWT compatibility: you can now use Ashley for HTML5 games through the magic of GWT and Libgdx.
  • Depends on gdx core: this has allowed us to remove all the duplicated optimised container classes and gives us a GWT compatible reflection API. Some might say it’s a big dependency but we do believe the pros outweigh the cons.
  • Cleanup and bug fixes.

I try to keep an up-to-date TODO list with a very informal roadmap. Here is what to expect next:

  • Performance tests and comparison with Artemis
  • Make javadocs available online
  • Complete wiki

Feel free to send your suggestions by opening an issue!

Ashley entity framework

Loads of stuff in the pipeline lately: new job, finishing my book and some Ashley development. What? You don’t know what Ashley is? Here is a brief, straight from GitHub.

A tiny entity framework written in Java. It’s inspired by frameworks like Ash (hence the name) and Artemis. Ashley tries to be a high-performance entity framework without the use of black-magic and thus making the API easy and transparent to use.

Long story short: Ashley is awesome.

Stefan Batchmann started the project on February 2013. Since he is rather busy making actual games, he asked me to look after the project and I gladly accepted.

Entity systems are really cool and can help you write cleaner game code, avoiding the classic inheritance hierarchy hell. This article does a pretty good job at explaining the benefits of entity systems.

It’s funny how strongly opinionated developers seem to feel towards entity systems. Some love them, some hate them. Have a read, experiment with Ashley and decide for yourself.

The readme will help to you get started. Please, do not hesitate to open an issue if you find any problems. If you send a pull request, you will have our unconditional love.

Expect more Ashley related articles soon!

Libgdx Cross-platform Development Cookbook announced

libgdx cross platform development cookbook

Almost a year ago, I started working on a Libgdx recipe book with Alberto Cejas, an old University mate. Now, Packt Publishing, have announced the project on their website, Libgdx Cross-platform Development Cookbook.

You can even pre-order a printed copy or the e-book version (DRM free).

Exciting times!

The book offers step-by-step guides on how to master Libgdx subsystems to build 2D games that run almost everywhere: Windows, GNU/Linux, Mac, Android, iOS and browsers. It only requires basic knowledge of games development and comes with a ton of sample code to help readers understand each topic.

I will post more information soon!