1.x Release notes

PlayN v1.8.5

PlayN v1.8

Core

Java

Android

iOS


## PlayN v1.7.2 * This is a minor patch release, so no API diffs are provided. * (Java) LWJGL native libraries are automatically unpacked and used. It is no longer necessary to manually setup java.library.path. * (Java) Substantially improved speed of uploading CanvasImage image data to GPU. * (Java) mvn package now creates standalone jar file which runs your game. * (Android) Upgraded to android-maven-plugin 3.6.0 which accommodates tool rearrangements in latest Android SDK. * (Android) Fixed issue with Canvas stroke width, cap, etc. not being saved and restored. * (Archetype) Brought the Ant build scripts up to date with various recent changes.

PlayN v1.7.1

PlayN v1.7

Core

Box2D

HTML

Android

iOS


## PlayN v1.6 * The way projects are organized has changed, please see Migrating15to16 for details.

Core

Java

HTML

Android

iOS


## PlayN v1.5.1 * Fixes issues with GWT compilation. * Reduces likelihood of problems with exported gwt-user Maven dependency. * Updates a number of transitive dependencies (LWJGL, Guava, JUnit, Android).

PlayN v1.5

### Core * Layer transform management has changed somewhat: layers now maintain their scale and rotation internally and only apply them to their transform prior to being rendered. Layers also provide getters for those values now. Because the values are no longer extracted from the affine transform (a lossy process) many annoyances are alleviated, but one must take care to either use the Layer accessors exclusively or to manipulate the transform directly exclusively. Don’t do both or you will encounter weirdness. * Graphics.setSize is deprecated (and does nothing). The size of your game view on Android/iOS is dictated by the device and any native controls you add to the native layout. The size on Java is configured via JavaPlatform.Config. The size in HTML is configured by the size of your playn-root div. The size in Flash is configured by the size of the object element that displays your Flash movie. * Graphics.layoutText now allows the empty string. It yields a TextLayout with width 0 and a height appropriate for the configured font. * Image loading is now asynchronous on all platforms (previously iOS/Java/Android loaded images syncrhonously). Assets.getImageSync can be used for synchronous image loading on platforms that support it (iOS/Java/Android). * Text loading is now asynchronous on all platforms (previously iOS/Java/Android loaded text synchronously). Assets.getTextSync can be used for synchronous text loading on platforms that support it. * All audio loading is now done on a background thread, but assets().getSound("foo").play() will still do “the right thing” because requests to play/stop a pending sound are noted and applied once the sound is loaded. * Assets.getRemoteImage allows loading images from URLs. * Assets no longer caches assets on any platform. Use CachingAssets wrapper. * Assets methods for watching loaded assets are deprecated. Use WatchedAssets wrapper. * AssetWatcher.Listener is now an abstract class and has a progress method. * ResourceCallback is deprecated, Callback is now used in its place. * Net callbacks now report HttpException on failure, which includes the HTTP status code. * Touch/Pointer now also reports cancelled events (which happen on Android/iOS). * Platform.setPropagateEvents can be used to cause events to be propagated down (and back up) the layer hierarchy instead of just being dispatched directly to the hit layer. * Log.Collector allows one to intercept all PlayN log messages (for sending over the network with bug reports, say). * Storage provides an interface for batch setting/deleting properties, which dramatically increases performance on Android when updating hundreds or thousands of properties at once. * Json now provides getLong.

Java

Android

iOS


## PlayN v1.4 ### Core * Can now receive notifications when game is paused/resumed and will exit: PlayN.LifecycleListener. * Added per-layer touch event handling: Layer.addListener(Touch.LayerListener). * Per-layer mouse event handling now uses Mouse.LayerListener which supports onMouseOver, onMouseOut and onMouseWeheelScroll. * Added clipped group layers: Graphics.createGroupLayer(width,height). * Added Net.WebSocket which currently works on HTML and Java backends. * Added custom GLSL shader support for GL-based backends. See GLShader and ShaderTest.java. * Added GLContext.setTextureFilter for configuring image scaling filter on GL-based backends. * Added Sound.volume for obtaining the current volume of a sound. * Added Mouse.isEnabled/setEnabled, same for Touch and Pointer. * Exposed Image.ensureTexture as a public API. * JsonObject.getArray now returns null for non-existent keys, not an empty array. * Removed a great deal of previously deprecated methods (Canvas.drawText, Graphics.createPath, Graphics.createPattern, CanvasLayer, TextLayout effects, etc.). * Various fixes to GL20 implementations. * Fixed issues with clipped layers with non-zero origin. * Improved error reporting to Sound resource listeners on all backends.

Java

HTML

iOS


## PlayN v1.3.1

PlayN v1.3

### Core * Changed Image.width/height and [http://docs.playn.googlecode.com/git/javadoc/playn/core/Canvas.html Canvas.width/height] from int to float. * Graphics.createImage/createSurface now accepts float width and height and rounds up to an int width/height for you. * Added PlayN.invokeLater. * Added Path.bezierTo, removed [Path].arcTo. * Added Canvas.stroke/fillRoundRect. * Added Image.getRgb. * Added Image.Region.setBounds. * Added Image.transform. * Added Mouse.MotionEvent.dx/dy. * Added Mouse.lock/unlock/isLocked/isLockSupported. Only works on Java backend currently. * Allow supplying null to Image.setImage to clear out image. * Added Mouse.hasMouse and [http://docs.playn.googlecode.com/git/javadoc/playn/core/Touch.html Touch.hasTouch]. * Added Json.TypedArray.Util. * Added ImmediateLayer.renderer. * Deprecated Canvas.drawText, replaced by Canvas.strokeText and Canvas.fillText. * Deprecated TextFormat.Effect. Effects can now be achieved using stroke/fillText. * Updated Pythagoras dependency to 1.2. * Fixed problem where GroupLayer would be marked as non-interactive if it had listeners but no interactive children. * Fixed issue where Sound.addCallback would not properly notify callbacks after the sound was loaded.

Java

Android

iOS

HTML

Flash


## PlayN v1.2 ### Core * Added mouse and pointer dispatch to layers. See Layer.addListener(Mouse.Listener), [Layer.addListener(Pointer.Listener)], Layer.setHitTester. * Added Image.subImage, deprecated ImageLayer.setSourceRect and ImageLayer.clearSourceRect. * Added Image.toPattern, deprecated Graphics.createPattern. * Added Canvas.createPath, deprecated Graphics.createPath. * Added GroupLayer.addAt. * Added Layer.Util.parentToLayer(Layer,Layer,IPoint,Point). * Added Surface.setAlpha. * Added Surface.fillTriangles in two variants. * Fixed Surface.fillRect when used with a fill pattern. * Made methods that accept ResourceCallback properly contravariant in their type parameter. For example Image.addCallback(ResourceCallback). * Removed value(int), value(double), and value(float) methods from JsonSink. They are properly handled by value(Number) and these overrides were actually causing problems by (silently) promoting long to double. * Removed PlayN.assetManager methods (deprecated in v1.1). Use PlayN.assets method.

Note: the following are provisional interfaces, not fully implemented, and subject to change: * Added Keyboard.hasHardwareKeyboard and [http://docs.playn.googlecode.com/git/javadoc/playn/core/Keyboard.html Keyboard.getText]. * Added GL20 abstraction over OpenGL ES 2.0. See [http://docs.playn.googlecode.com/git/javadoc/playn/core/Graphics.html Graphics.gl20]. This (in theory) allows creation of 3D OpenGL games that run on Android and WebGL.

Note also: CanvasLayer was spared the axe in this release, but it’s going away in the next release. Update your code!

Android

Flash

HTML

iOS

Box2D


## PlayN v1.1.1

PlayN v1.1

Core

New features: * Added Canvas.setAlpha. * Json interface was rewritten: * Moved from json.org’s parser to a more sane parser that matches the behavior of web mode’s JSON.parse. * JSON arrays and objects are now mutable (add, set, remove items). * Add an optional default parameter to all JSON getters (0 or null is the default otherwise). * Add type introspection to JSON objects and arrays: isArray, isBoolean, isNumber, etc. * For an example of the changes you must make to your code, see this commit. * Added ImmediateLayer. See ImmediateTest.java for an example of its use. * Note that the ImmediateLayer API may evolve slightly based on feedback as it is a new API. * Added PlayN.assets for obtaining the assets service (replaces PlayN.assetManager).

Obsoleted: * CanvasLayer was deprecated. Use CanvasImage in conjunction with ImageLayer. This combination provides a superset of CanvasLayer functionality. * Image.replaceWith was removed. * PlayN.assetManager (and AssetManager) was deprecated, use PlayN.assets (and Assets) instead.

HTML

New features: * Added HTML5 canvas backend (which joins the HTML5 WebGL backend and the now-deprecated HTML5 DOM backend). The canvas backend will automatically be selected for browsers that don’t support WebGL. Append ?renderer=canvas to force the use of the canvas backend. * Simple log messages are sent to the browser console even if enhanced logging is not enabled.

Bug fixes: * Touch events have preventDefault called on them automatically now. This prevents undesirable scrolling and other weird behavior on mobile browsers. * Fixed rendering issues with repeat-x/y images. * Fixed Maven dependencies: playn-html no longer exports an inappropriate dependency on gwt-user. * Modified Google App Engine support. playn-html no longer exports a dependency on GAE jars. Those dependencies are added to projects created via the Maven archetype.

Android

New features: * Android now properly references .mp3 files for audio instead of .wav files. All backends in PlayN now use MP3 encoding.

Bug fixes: * Pre-multiplied alpha is now properly supported. * GL cleanup (texture and framebuffer deletion) no longer performed on the finalizer thread.

iOS

New features: * The entire iOS backend is a new feature. * The functionality is not 100% complete (see the platform status page for details) but it is sufficiently complete to try things out. * There are limited instructions for building your game on iOS. See this thread for details.

Java

New features: * Added support for loading assets asynchronously to mimic the behavior of the HTML backends. Set the playn.java.asyncLoad system property to enable async loading. For example: mvn -Dplayn.java.asyncLoad test -Ptest-java. * Added support for registering custom fonts with the Java backend. * Other platforms will eventually also have such support. * See ShowcaseJava.java and TextDemo.java for an example of registering and using a custom font.

Bug fixes: * Background is properly cleared to black before painting.


## PlayN v1.0.3 * (HTML) Updated gwt-voices dependency to 2.1.5 (fixes Web Audio API issues). * (Java) Fixed issue with java.io.tmpdir usage.

PlayN v1.0.2

PlayN v1.0.1

PlayN v1.0

We weren’t making nice release notes back in these days.