How to Get Distance field fonts in LibGDX using Hiero, and finding an updated version of Hiero


Distance fields are used in LibGDX for being able to make fonts clearer when resizing them, which allows you to have clearer text using just one font size on all devices instead of needing to include several (or have low quality looking text)

LibGDX Wiki Instructions, or what not to do

The LibGDX official wiki does a good job of explaining what and how to use distance field for clearer font in LibGDX:, but seems to be unbelievably vague about using the Hiero font tool, with links to 2012 pre- “distance field” versions of hiero, and no apparent way to find or run a version that works. They even so far as to suggest use github to download the entire LibGDX source project, re-compiling it to get access to from the gdx-tools project.

I installed the windows version to connect to github, cloned the repository and downloaded the 1GB source, changed my workspace in eclipse, and tried to compile the source, only to be met with 1000s of compiling errors, hours into getting it to work, and no closer to running a “version of Hiero that supports distance fields”.

How to actually get a supported version of Hiero

Luckily I was able to find an article written by Packt Publishing on how to run Hiero(

But it’s actually somewhat simple:

  1. Download the latest stable version of LibGDX from their site (not through Maven/ Gradle/ GitHub/ Google Code/ flavor of the week, but through the link they say “We strongly discourage using these old release builds….”):
  2. Unzip that into a temp folder (or just copy it from the zip into the folder in the next step)
  3. Create a folder where you want to run Hiero from- prob just a folder in your working directory called “hiero”
  4. Copy the following files into that folder:
    • gdx.jar
    • gdx-backend-lwjgl.jar
    • gdx-backend-lwjgl-natives.jar
    • gdx-natives.jar
    • gdx-tools.jar
  5. Now Right click in the folder, create a new text document, and rename it to: Hiero.bat (Make sure you can see the .jar on the other files in the folder, or you have to turn off “hide extensions for known file types” in windows folder options)
  6. Open the Hiero.bat by right clicking on it, and opening it with a text editor(right click and hit edit)
  7. Inside the text document put this: java -cp gdx.jar;gdx-natives.jar;gdx-backend-lwjgl.jar;gdx-backend-lwjgl-natives.jar;gdx-tools.jar
  8. Close the text editor and double click on the Hiero.bat, and it should run Hiero! (you should see ‘Distance field’ on the bottom of the effects section on the right side)

Now the LibGDX Wiki can be helpful again!

Now that we actually have a version of Hiero running that we can follow along with the wiki article, the article becomes useful again. Follow the directions under:
Generating the font

I found that this works reasonable for generating fonts down to size 18, with the same values that the wiki uses (spread=4, padding =4 for all, x, y =-8, but scale looked best for me at 24, probably because I used a smaller font size)

The rest of the article was pretty straight forward for me, and I was able to get distance fields working pretty well in the game (low distortion at larger or smaller font size, with minimal artifacts around lowercase t’s, but overall much better than normal scaling).

The only real disadvantage is that I was using Hiero to generate drop shadows to make text more readable before, but distance fields don’t allow you to export it with Hiero (have to clear all effects aside from distance field). The article hints at being able to add directional drop shadows “using the texture’s gradient”, but offers no additional information.

Let me know if you find a way to get drop shadows or other effects working! Text isn’t the central focus of games, but is necessary for a lot of communication, and for now I just put a black transparent box behind any text field to allow it to be readable without drop shadows.

Android Studio Application Development Book Review Giveaway!

I recently reviewed “Android Studio Application Development”, and Packt Publishing has been gracious enough to allow me to raffle off 3 e-copies of the book!

Comment, and let me know why you would be interested in the book, and I’ll use a random number generator to select 3 people! So then check back (or leave your email address and name and I’ll contact you if you won, and forward the info to Packt Pub for them to add the book to your account)!

Pickup a great LibGDX tutorial book that I was one of the technical reviewers for!

Learning LibGDX Game Development is a great LibGDX tutorial book that I have the pleasure to be associated with 😀

I mainly just double checked everything, made sure it was easy enough to follow, but the author did a surprisingly concise, yet well thought out series of tutorials, culminating in having a finished “runner” type game, using LibGDX, so you can deploy to Android, PC, Linux, Mac, even iOS now.

I learned some things about Scene2d, and I can say if you’re interested in saving some time trying to learn al; by yourself, this will give you an enormous head start.

I got a copy of the book, and my name on it, but don’t get anything else for being a technical reviewer, but I would have bought the book based on the content. Check out the table of contents for an idea of the awesome stuff it covers, you’re pretty much guarenteed to learn a lot from it.

You can pick it up from their website now at:

Android Studio Application Development Book Review

I was able to get a chance to read from packt publishing, and wanted to share my review.

My overview is that it is useful for understanding the interface of Android studio, and learning the basics of how to use it.

The book explains the how to setup a project, configure Android studio, and steps you through how you would do common things that you would need to be able to do when setting up an app, changing the design, and compiling and debugging it. The book does not give you a complete tutorial of creating an application using Android Studio, but just how to actually use Android studio, and getting you comfortable/ understanding the interface. If you are new to Android development, this book will walk you through the interface, but will not teach you how to create different types of apps. If you are an existing developer using eclipse, this book will give you a head start on understanding the interface, and where to find things that you are used to using.

You can pick it up now if you’re interested at:

Unity basic for Android and iOS now free!

Good news for all you other indie developers out there- Unity basic for Android and iOS is now free!

Unity basic seems like it would be more than sufficient for the needs of most indie developers. This means that there will be a lot more people trying out Unity, publishing games, and making the platform stronger. Plus, the Unity developers will probably still make a good amount of money from additional purchases in the asset store.

I had been holding off developing in Unity until my current games could be generating enough income to easily justify the purchase, or for when I started going towards more 3d games, but I think I will try to publish a Unity game within the next couple months, to really test out the platform.

AndEngine for Android Game Development Cookbook Review

I really enjoyed this book because it appears to be helpful both to game developers who want to start using the AndEngine, as well as people that might be new to game development in general. Every cookbook “recipe” is something that you will need to use eventually while programming games, but it’s laid out so if you are looking for a particular concept you can find it easily, or if you are a beginner to game development, you can read through the book from beginning to end, and get all the tools you will need to create pretty much any game, and get ideas on things that you can add, that you might have not otherwise thought of.

The author touches upon such a wealth of topics, from basic drawing, animated sprites, parallax backgrounds, box2d physics(with many examples), menu systems, and so much more, which makes this book valuable for the solutions that can be applied to other gaming frameworks you chose to use in the future.

The author even includes the source code for a fully professional quality game, and references which recipes were used to create each portion of it!

If you are interested in developing games using AndEngine, this is a great place to start. If you want a book that will stay a valuable reference in your library as you continue down the path of game development, get this book.

You can pick it up from:

LibGDX demo platformer for 2d side scrolling game like Mario!


Since I had seen this post: on Badlogic, about adding a new maps API to libGDX, as well as a side scrolling demo into the official source, I have really wanted to see it in action, and play around with it a bit.

So, I finally got around to downloading the source for LibGDX from Github again, finding the demo and compiling it using the basic project shown here:

I have uploaded the HTML5 demo so you can play it, and have included the source code for the demo:
Continue reading

How to start creating android games using the LibGDX game development framework (UPDATED with gdx-setup-ui.jar)

NOTE: This is an updated version of a previous article, since it is now much easier+faster to create a LibGDX project using gdx-setup-ui

Why Android?

I’ve been creating games using flash/actionscript for a while now, but have really wanted to get started with android game development, since it’s an open source platform, the sky is the limit to how much you can learn about it.

The devices are usually fairly non-restrictive, being able to load custom roms, install any available software – even not directly through the market, being more practical (using internal storage as storage, not needing to install bloatware to connect to a computer), as well as having many more choices in hardware, since there is such a wide diversity of available mobile phones.

All in all, Android is very non-restrictive and flexible to it’s users, as well as it’s developers, and the market is supposed to be much easier to upload your app on, without getting turned down without a reason. It also caters more towards free apps (with ads), which is what I had wanted to offer, to allow everyone to be able to play my games.

Why LibGDX?

I have read a few android programming books, and most go into quite a bit of detail about application programming, but very little about OpenGL, not to mention I hadn’t done much programming using multiple separate threads in the past.

LibGDX takes care off pretty much all of the low-level stuff for you, so you can focus on game programming, or basic engine programming, and not about techniques for loading different image and music types, creating and handling multiple threads, or creating OpenGL surfaces to render 2d bitmaps on to.

Using it also does not take away any of the control you have, i f you wanted to or needed to program lower level stuff, such as creating surfaces and 3d objects using OpenGL. Thus, it provides an excellent platform to get started with without having to worry about creating everything from scratch yourself, but also allows you to create things later on when you need them.

And for super-icing on the cake, it is specifically made for creating games, and it also allows you to compile and test using native Java on your computer before deploying to your android device, which makes debugging and compile time so much faster! No needing to deal with the android emulator for most of your design, unless you wish to, no needing to compile the apk, move it to the SD card, install, open, and finally debug- you can do it all on your computer before deploying to your android device!

So in summary:

  • Handles a lot of the stuff that you would normally need to program from scratch, saves you time, as well as allows you to expand it if needed
  • Specifically created for games!
  • Debug, test and try out your android app without having to rely on having a device/ emulator running almost all the time!
  • Open source and free, as well as great forums for support

So Now that you know why it is a great framework to use to develop android games, lets get up and running.
Continue reading

Ackmi Dress Up 2 released!!!

Ackmi Dress Up 2 has finally been released after many months of development!

You can now download Ackmi Dress Up 2 on your Android Device from the market:

You can also play the game in your browser on your PC at:

Or install on the chrome store at:

Making money on Android – tips from an Android developer

I decided to start posting articles to update other Android developers with information I’ve found from in my games released in the past 3 years.

First Game

My first released Android game: Ackmi Dress Up was released on the Android market in the end of 2011, and is still going pretty strong, with regular updates.

The key ideas for that game were:

  1. Find a niche area with high demand and low competition (described in “The 4 hour work week” by Tim Ferris)
  2. Create something as simple as possible, to decrease the development time to as little as possible for first release. Both to test the Niche area, as well as fund further development.
  3. Create something that we could update regularly with new content, to keep it fresh, and players returning to try out the new content.

After we released the game, it was slowly bringing in a few dollars per week, but as October hit, the number of downloads started increasing drastically, and increased even more in December. During December, we made enough from Ad money from Admob to potentially afford a one bedroom apartment with normal food an utility bills!

January Blues

As soon as January hit- we went from making low livable wages, to making about what groceries would cost for the month. The number of people downloading and playing didn’t decrease until the end of January- just the Ad network paid a small portion of what it paid in December for eCPM.

So from this- you can generally expect December to be your best month of the year, and January to be the worst (but it actually continued to decrease for us, occasionally increasing until October again).

In summary:

Things that worked:

  • Find a niche market that isn’t overcrowded yet, and hopefully with high demand (use Google keyword research to determine monthly global searches)
  • Create a product with the smallest development time possible in that market- then try to decrease it as much as possible.
  • Make sure you can update regularly to keep some users

Things that didn’t work:

  • Creating a game that requires months of content creation, with only minutes of gameplay
  • Creating a game with limited re-playability
  • Only having one game during the Christmas season, and not realizing that October->December will give a temporary boost to download numbers/ revenue

I’ll try to touch on more issues/ things learned in future articles.

Let me know if you want to know any specifics! (Aside from very generic questions like “How do I make a game”, or things that you could easily use Google to find out yourself)