If you are looking for past changelogs, check out this page.
Today, we are releasing version 1.9.12 of libGDX – and with that a lot of exiting changes. As you may recall, initially, this release was supposed to be called 1.10, but we had some troubles with publishing on maven, so this release is named 1.9.12. However, don’t you worry, this changes nothing about the contents of this update!
Linux ARM Builds
One of the major additions in libGDX 1.9.12 is the support for Linux ARM builds with our LWJGL 3 backend. We already talked about this in our past Status Reports, but Raspberry Pi here we are – and we are here to stay! If anyone of you has some cool pictures of libGDX games running on a Raspberry Pi, poke me on Discord - we would very much like to put together a small showcase of the first console supported by libGDX.
Version 1.9.12 contains a few breaking changes, which require the developers to take some steps to update their apps:
- The handling of HDPI, ahem, Retina on iOS was adapted to match the implementations on the other platforms (#3709). If you were using
getWidth()until now, you have to replace those calls with
getBackBufferWidth()(the same for height). If you rely on viewports, there is no need of changes, because sizes are virtual anyway. If you are using
getDensity()to position your UI elements, take a look here.
InputProcessor#scrollednow receives two (!) float (!) values:
InputEventwas changed accordingly. To match the old behaviour use the
Vector2#angleRad(Vector2)now correctly returns counter-clockwise angles (#5428).
Gdx.graphics.getDeltaTime()now returns the raw delta time instead of a smoothed one (#6228).
Gdx.files.externalon Android now uses an app’s external storage directory. See this wiki article for more information.
Other notable changes:
- Updated to MobiVM 2.3.11 (which supports the latest Apple devices, but not yet the iOS 14 bindings)
- As announced in Status Report #1, the iOS MOE backend was removed in favour of the RoboVM one.
- The audio backend on GWT was changed to the WebAudio API (#5659). This allows for better mobile support and implements pitch. The
preferFlashconfig option was removed. When updating existing projects, you can remove the soundmanager JS files from your webapp folder and the references to it from index.html.
- The GWT backend now supports resizable applications via the use of
GwtApplicationConfiguration. The old resizing code from your HTMLLaunchers can be removed.
- There is now also the possibility to lazy load assets via AssetManager instead of preloading them before game start. See here for more information.
- We added a
Lwjgl3ApplicationConfiguration#foregroundFPSoption to the LWJGL3 backend to match the behaviour of the old LWJGL2 backend. This can be used to set a target framerate for games on desktop.
- If you are having trouble playing several sounds simultaneously on Android, you can try the new
Just to give you all a quick outlook on what we’re planning for the next weeks:
- gdx-controller version 2.0.0 is done and will be released shortly.
- Status Report #4 will focus on our new web-based setup tool and will be published in the next couple of weeks, as soon as our setup tool is ready for public testing.
- As mentioned in Status Report #3, our next libGDX release is set for the end of the year.
- gdx-video and the Box2D update are still being worked on.
The latest version of dependencies can, as always, be found here.
- [BREAKING CHANGE] iOS: Changed how Retina/hdpi handled on iOS. See #3709. - [BREAKING CHANGE] API Change: InputProcessor scrolled method now receives scroll amount for X and Y. Changed type to float to support devices which report fractional scroll amounts. Updated InputEvent in scene2d accordingly: added scrollAmountX, scrollAmountY attributes and corresponding setters and getters. See #6154. - [BREAKING CHANGE] API Change: Vector2 angleRad(Vector2) now correctly returns counter-clockwise angles. See #5428 - [BREAKING CHANGE] Android: getDeltaTime() now returns the raw delta time instead of a smoothed one. See #6228. - [BREAKING CHANGE] Gdx.files.external on Android now uses app external storage - see wiki article File handling for more information - Update to MobiVM 2.3.11 - Added support for Linux ARM builds. - 32-bit: ARMv7/armhf - 64-bit: ARMv8/AArch64 - Fixed vertices returned by Decal.getVertices() not being updated - Fixes Issue #5048. The function Intersector.overlapConvexPolygons now should return the right minimum translation vector values. - API Change: Removed Pool constructor with preFill parameter in favor of using Pool#fill() method. See #6117 - API Addition: Slider can now be configured to only trigger on certain mouse button clicks (Slider#setButton(int)). - Fixed GlyphLayout not laying out correctly with color markup. - Fixed TileDrawable not applying its scale correctly. - API Addition: Added epsilon methods to maps with float values. - API Addition: Added an insertRange method to array collections. - Fixed GestureDetector maxFlingDelay. - API Change: Changed default GestureDetector maxFlingDelay to Integer.MAX_VALUE (didn't work before, this matches that). - Improved text, cursor and selection rendering in TextArea. - API Addition: Added setProgrammaticChangeEvents, updateVisualValue, round methods to ProgressBar/Slider. - iOS: Keyboard events working on RoboVM on iOS 13.5 and up, uses same API as on other platforms - API Addition: Added AndroidLiveWallpaper.notifyColorsChanged() to communicate visually significant colors back to the wallpaper engine. - API Change: AssetManager invokes the loaded callback when an asset is unloaded from the load queue if the asset is already loaded. - GWT: changed audio backend to WebAudio API. Now working on mobiles, pitch implemented. Configuration change: preferFlash removed. When updating existing projects, you can remove the soundmanager js files from your webapp folder and the references to it from index.html - GWT: added possibility to lazy load assets via AssetManager instead of preload them before game start. See GWT specifics wiki article for more information. - GWT: New configuration setting usePhysicalPixels to use native resolution on mobile / Retina / HDPI screens. When using this option, make sure to update your code in index.html and HTMLLauncher from setup template. - GWT: GwtApplicationConfiguration and GWT backend now support an application to be resizable or fixed size. You can remove your own resizing code from your HTMLLaunchers. - GWT: Assets in distribute build are renamed with MD5 hash suffix to bypass browser cache on changes - GWT: Fixed GwtFileHandle that was only returning text assets when listing a directory, now returns all children - API Addition: Pixmap.downloadFromUrl() downloads an image from http(s) URLs and passes it back as a Pixmap on all platforms - API Change: Removed arm abi from SharedLibraryLoader - API Addition: Added a Lwjgl3ApplicationConfiguration#foregroundFPS option. - API Change: Utility classes are now final and have a private constructor to prevent instantiation. - API Change: ScrollPane now supports all combinations of scrollBarsOnTop and fadeScrollBars. - API Addition: Added new methods with a "deg" suffix in the method's name for all Vector2 degrees-based methods and deprecated the old ones. - API Addition: Added Slider#setVisualPercent. - API Change: Enabling fullscreen mode on the LWJGL3 backend now automatically sets the vsync setting again. - API Addition: Added put(key, value, defaultValue) for maps with primitive keys, so the old value can be returned. - API Addition: Added ObjectLongMap. - Added Intersector#intersectRayOrientedBoundsFast to detect if a ray intersects an oriented bounding box, see https://github.com/libgdx/libgdx/pull/6139 - API Addition: Added Table#clip() and Container#clip() methods. - API Addition: Added getBackgroundDrawable() to Button. - API Addition: Added imageCheckedDown and getImageDrawable() to ImageButton and ImageTextButton. - API Addition: Added focusedFontColor, checkedFocusedFontColor, and getFontColor() to TextButton and ImageTextButton. - API Addition: Added wrapReverse setting to HorizontalGroup. - API Addition: Added Slider style drawables for over and down: background, knobBefore, and knobAfter. - Fixed LwjglFrame not hiding the canvas in some situations. - API Change: Table#round uses ceil/floor and is applied during layout, rather than afterward. - Fixed blurry NinePatch rendering when using a single center region. - API Change: Upon changing the window size with the LWJGL3 backend, the window is centered on the monitor. - Fixed DepthShaderProvider no longer creates one DepthShader per bones count. Now it creates only one skinned variant and one non-skinned variant based on DepthShader/Config numBones. - API Addition: Added Intersector#intersectPlanes to calculate the point intersected by three planes, see https://github.com/libgdx/libgdx/pull/6217 - API Addition: Added alternative Android Audio implementation for performant sound. See https://github.com/libgdx/libgdx/pull/6243. - API Addition: Expose SpriteBatch and PolygonSpriteBatch setupMatrices() as protected. - API Addition: New parameter OnscreenKeyboardType for Input.setOnscreenKeyboardVisible and Input.getTextInput