libGDX 1.6.0 released

libGDX 1.6.0

Time for a new release, lock-stepping with RoboVM :D

The CHANGELOG:

[1.6.0]
- API Change: GlyphLayout xAdvances now have an additional entry at the beginning. This was required to implement tighter text bounds. #3034
- API Change: Label#getTextBounds changed to getGlyphLayout. This exposes all the runs, not just the width and height.
- In the 2D ParticleEditor, all chart points can be dragged at once by holding ctrl. They can be dragged proportionally by holding ctrl-shift.
- Added Merge button to the 2D ParticleEditor, for merging a loaded particle effect file with the currently open particle effect.
- Added ability to retrieve method annotations to reflection api
- Added PixmapPacker.updateTextureRegions() method.
- Added ability to pack "anonymous" pixmaps into PixmapPacker, which will appear in the generated texture but not a generated or updated TextureAtlas
- Added PixmapPacker.packDirectToTexture() methods.
- API Change: PixmapPacker.generateTextureAtlas(...) now returns an atlas which can be updated with subsequent calls to PixmapPacker.updateTextureAtlas(...)
- API Change: FreeTypeFontGenerator.generateFont(...) now works with a user-provided PixmapPacker.
- Added DirectionalLightsAttribute, PointLightsAttribute and SpotLightsAttribute, removed Environment#directionalLights/pointLights/spotLights, added Environment#remove, lights are now just like any other attribute. See also https://github.com/libgdx/libgdx/wiki/Material-and-environment#lights
- API Change: BitmapFont metrics now respect padding. #3074
- Update bullet wrapper to v2.83
- Added AnimatedTiledMapTile.getFrameTiles() method

Note: Make sure to update your RoboVM Eclipse plugin to 1.2.0! There’s now also a RoboVM IntelliJ IDEA plugin!

Let us know if you run into any issues. See this wiki article on how to update your libGDX project to the latest version. The current libGDX version is “1.6.0”, the current nightly version is “1.6.1-SNAPSHOT”, OR you can just check our versions page which details all the versions of dependencies as well.

If you ever thought “I love all this free libGDX stuff, how can i contribute back?” then you got multiple options:

  1. Take part in the libGDX community, spread your knowledge (like /u/serapth) and maybe even send a pull request.
  2. If you have any interest in cross-platform mobile dev for iOS, Android and soon Windows 10 with Java or an alternative JVM language, check out RoboVM. Maybe even consider buying a license while they are 50% off (Solo is $99). Would also be great if you told your (Android dev) friends about it.

Did i mention that RoboVM is still free to use as before? No strings attached. A license just gives you new features like Interface Builder support, not usually relevant to game devs. You don’t have to pay us a dime to use it with libGDX (or a normal iOS app). So there’s that.

That 50% discount offer ends tomorrow. Help put some food on my table :)

One more thing before i leave: if you like libGDX but always found the lack of a code-centric WYSIWYG editor disturbing, check out [Overlap2D](http://overlap2d.com/). It’s fully OSS now, so jump in, contribute, make it awesome, NAO!

Happy Coding.

Font metrics changes

For bitmap fonts, padding can be added when the bitmap font is created to give more space around the glyphs for effects like a glow or drop shadow. BitmapFont has so far ignored padding, as reported in #3074. This means the font metrics change depending on the padding used, which makes it difficult to draw text where you want it. This PR has now been fixed, so the metrics are the same no matter how much padding is used around the glyphs.

Font metrics

Unfortunately this means that if you had been using a font that used padding, all of your carefully placed text may change size or position. You can go and fix this up everywhere, but for existing apps it is likely easier to just use this code to go back to the old behavior:

/** Adjusts the font data metrics to not take padding into account. */
static private void includePaddingInMetrics (BitmapFontData fontData) {
	float padY = fontData.padTop + fontData.padBottom;
	fontData.xHeight += padY;
	fontData.capHeight += padY;
	fontData.ascent -= padY;
	fontData.descent -= fontData.padBottom;
	fontData.padTop = 0;
	fontData.padLeft = 0;
	fontData.padBottom = 0;
	fontData.padRight = 0;
}

libGDX 1.5.6 Released

libGDX 1.5.6

Time for a new release. Just because Nate couldn’t stop refactoring. Welp, that, and there’s a new RoboVM release! More on that below.

The CHANGELOG:

[1.5.6]
- API Change: Refactored Window. https://github.com/libgdx/libgdx/commit/7d372b3c67d4fcfe4e82546b0ad6891d14d03242
- Added VertexBufferObjectWithVAO, see https://github.com/libgdx/libgdx/pull/2527
- API Change: Removed Mesh.create(...), use MeshBuilder instead
- API Change: BitmapFontData, BitmapFont, and BitmapFontCache have been refactored. http://www.badlogicgames.com/wordpress/?p=3658
- FreeTypeFontGenerator can now render glyphs on the fly.
- Attribute now implements Comparable, custom attributes might need to be updated, see: https://github.com/libgdx/libgdx/wiki/Material-and-environment#custom-attributes
- API Change: Removed (previously deprecated) GLTexture#createTextureData/createGLHandle, Ray#getEndPoint(float), Color#tmp, Node#parent/children, VertexAttribute#Color(), Usage#Color, ModelBuilder#createFromMesh, BoundingBox#getCenter()/updateCorners()/getCorners(), Matrix4.tmp

Note: Make sure to update your RoboVM Eclipse plugin to 1.1.0! There’s now also a RoboVM IntelliJ IDEA plugin!

Let us know if you run into any issues. See this wiki article on how to update your libGDX project to the latest version. The current libGDX version is “1.5.6”, the current nightly version is “1.5.7-SNAPSHOT”, OR you can just check our versions page which details all the versions of dependencies as well.

What i’ve been up to (RoboVM 1.1 released, 50% off :D)

My day job for the past months has been working on RoboVM. I’ve been responsible for implementing the debugger, the IDEA plugin, fixing bugs here and there, and am currently involved in the documentation effort. Today, we released version 1.1, and that comes with a super huge feature: Interface Builder support!

Interface Builder is part of Xcode and allows Objective-C/Swift folks to design their iOS UIs visually and simply wire things up with code. We now support doing the same, and it’s very nifty. Check out this walk through of Interface Builder basics:

This is a really big productivity boost for RoboVM users. Interface Builder integration is free for everyone, including RoboVM users that only use the open-source core, until the 1st of May. So, if you feel curious about iOS development, install the RoboVM plugin for your preferred IDE, and give the tutorials on your documentation page a try. Would love to hear feedback!

Why am i telling you this? libGDX folks publishing to iOS use RoboVM under the hood. You don’t need to pay a single dime for that. The core of RoboVM is open-source and free as in beer, no strings attached. However, obviously we RoboVM folks need to put food on the table as well. So, if you want debugging and Interface Builder support, you have to subscribe for a license.

Doing a release is a lot of sweat and tears. Once you press the button, you loosen up a bit and feel really happy. We do share this feeling with our community through happy tweets and blog post. However, we can do better.

If you sign up for a Solo or Startup license until the 1st of May 2015, you get a 50% discount

Head over to the RoboVM release blog post to get more info.

Until then, happy coding!