RegExpservices were removed.
width/heighton an image layer with no image, but for which the width/height was manually set.
HtmlPlatform.Config.rootIdfor using a root element id other than
getBytesSync. Not implemented on HTML/Flash backends (due to platform limitations in HTML’s case).
TextFormat.antialiasto allow disabling of antialiasing when rendering text. Doesn’t work on HTML backend because it’s impossible to disable antialiasing in HTML5.
TextLayout.textwhich tells you what text will be rendered by a
layoutText(String,TextFormat,TextWrap)which returns one
TextLayoutinstance for each line. The old mechanism where a single
TextLayoutcould represent many lines of text is deprecated.
TextBlockfor rendering centered/left/right-aligned multiline text.
convertImagesOnLoadwhich causes images to be converted to GPU friendly code on a background thread at load time instead of on the main render thread the first time the image is used.
Storageimplementation to use Java preferences (instead of a properties file written to temporary storage). This means that Java Storage data persists across machine reboots, a useful characteristic if you’re shipping a game using the Java backend.
emulateTouchfor emulating multitouch on the Java backend. Press F11 when enabled and the touch pivot point is set, and a mouse click then results in a two-finger touch, mirrored across the pivot point. This is similar to how it works in the iOS simulator.
swt-javabackend, which hosts LWJGL in a SWT Canvas. This is useful if you want to overlay platform native UI elements atop your PlayN game. Due to limitations of LWJGL, overlaying AWT components atop a PlayN game doesn’t work on Mac OS.
appNamewhich configures the name of the native app running your PlayN game.
GameActivity.makeWindowFlagsto allow customizing window flags (e.g. reinstate status bar).
Canvasand HiDPI mode.
Typefaceinstance; this is needed if you want to register one of the Android default fonts for use in your game.
preloadwork properly for SFX.
fillTextwork when a fill gradient is configured.
IOSPlatform.OrientationChangeListenerfor hearing about orientation changes. This will probably some day be deprecated in favor of a cross-platform API for hearing about orientation changes, but a lot of work is needed to support a game that works in both portrait and landscape orientations.
getSoundare now played via OpenAL, which is substantially higher performance than the old AVAudioPlayer mechanism. AVAudioPlayer is still used for Assets.
getMusicbecause that’s what it’s for. See the migration guide for new requirements for CAFF and AIFC files.
## 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
* (Java) Substantially improved speed of uploading
CanvasImage image data to GPU.
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.
Event.capturewhich allows one to capture a pointer interaction, canceling any other ongoing interactions.
setScale(0)no longer throws an exception. This avoids the need to specially check for edge cases when animating the scale of a layer.
SurfaceLayer). No longer will the last rendered surface sometimes not show up.
SurfaceImageallows surfaces to be drawn and then shared among multiple ImageLayer instances, just like a normal image. In addition to simplifying the API, this allows a
SurfaceImageto be used as a repeating background, and/or stretched like any other Image in an ImageLayer.
drawLayer. This allows you to capture a “snapshot” of a scene graph into a
Surface. On GL-based backends, this executes all custom shaders and is essentially identical to the normal rendering pipeline except that the results are written to a separate texture instead of the framebuffer. This opens the door to all sorts of fun stuff.
Gameinterface. Now Game.
Defaultimplements the previously mandated
paintmodel (and improves rendering smoothness for that model), and the bare
Gameinterface allows a
Gameto implement whatever approach to separating physics from rendering that a game desires. See the Migrating16to17 for the code changes needed to use Game.
Clockto simplify life for libraries and games that need to handle interpolation of update/paint times.
PlayN.tickwhich returns a high-precision timestamp that’s useful for animation.
Builderwhich allows one to build HTTP requests with custom headers, supply binary POST payloads (except on HTML backend), read response headers and read binary response data (except on HTML backend).
setRepeatand removed ImageLayer.
setRepeat. Due to the way images are handled in GL, this admits fewer “unworkable” configurations. It was previously possible to attempt to use the same image in multiple layers with different repeat configurations, and tha would not have actually worked. Now it’s clear that an Image can have only one repeat configuration. This also enables
Patternto honor an images repeat configuration (partially implemented).
setMipmappedfor using mipmaps to improve quality of downscaled images on GL-based backends.
glTex(Sub)Image2Dmoved to GLContext.
IndexedTrisShaderis now easier to extend/customize.
Callback, you’re going to have to do it now.
setTransformwas deprecated in the 1.6 release and Surface.
setTransformshould also have been deprecated, but was missed).
playn-jbox2dnow pulls in
org.jbox2d:jbox2d-library:22.214.171.124which is GWT-compatible. See Migrating16to17 for the changes you’ll need to make to your project configuration.
WebSocketimplementation. Previously only binary messages worked. Has anyone actually used web sockets?
WebSocketimplementation for Android.
IOSPlatform.Config.interpolateCanvasDrawingwhich can be set to false to disable interpolation on Retina devices (which is useful for pixel-art style games).
getRGBon Retina devices. It now no longer interpolates pixels.
drawPointon Retina devices. It now draws a proper square pixel.
monotouch-maven-pluginwhich allows one to build and deploy iOS apps without having to use MonoDevelop (command line building unfortunately requires the Xamarin.iOS “business license”).
## PlayN v1.6 * The way projects are organized has changed, please see Migrating15to16 for details.
setMinLevelto allow suppressing log messages below a certain level. (Recommended by Google for Android release builds.)
releasefor releasing audio resources sooner than waiting for GC to do it.
getMusicwhich allows backends to make some optimizations relating to large audio files.
setSizewas removed, and special
setSizemethods were added to individual platform backend code that can reasonably support them (e.g.
Statsfor debugging rendering performance on GL backends. (See Triple Play’s HUD class for an easy way to display these stats.)
setTransformbecause it interacts poorly with automatic scale factor management in HiDPI modes.
CanvasImage.snapshotwhich can be used to create an immutable snapshot of a canvas image which has higher render performance.
TextLayout.ascent/descent/leadingfor cases where an app needs to know more about the text that will be rendered by a
TextLayout(for underlining, for example).
Writer.useVerboseFormatto cause the JSON writer to generate pretty printed output (rather than compact, everything on one line output).
HtmlAssets.ImageManifestwhich can be used to pre-load the dimensions of all images known to your app, and enable Assets.
getImageSyncto (sort of) work in the HTML backend. A wiki article explaining this will be forthcoming.
HtmlGraphics.registerFontMetricsfor overriding the (hacky) measurement of font line height.
html/pom.xml. See playn-samples for an example.
AndroidGraphics.setCanvasScaleFuncwhich allows games to use lower resolution canvas images if desired. This is useful on devices with low memory.
AndroidAssets.BitmapOptionswhich allows games to downsample images if desired. This is useful on devices with low memory.
GameActivity.prefsNamefor customizing the name of the Android preferences file.
GameActivity.logIdentfor customizing the Android log identifier. It defaults to
playnwhich is what was hard-coded before.
SoundPool. Music (large audio files) still relies on the old more-hardware-resource-intensive approach.
IOSPlatform.Configfor specifying configuration options.
IOSPlatform.Config.frameIntervalfor specifying target FPS on iOS.
IOSImage.toUIImagefor custom platform code that needs to manipulate an image loaded via
## 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).
* 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.
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
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.
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
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
getTextSync can be used for synchronous text loading on platforms that
* All audio loading is now done on a background thread, but
still do “the right thing” because requests to play/stop a pending sound are noted and applied
once the sound is loaded.
getRemoteImage allows loading images from URLs.
Assets no longer caches assets on any platform. Use
Assets methods for watching loaded assets are deprecated. Use
AssetWatcher.Listener is now an abstract class and has a
ResourceCallback is deprecated,
Callback is now used in its place.
Net callbacks now report
HttpException on failure, which includes the HTTP status code.
Pointer now also reports cancelled events (which happen on Android/iOS).
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.
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
JavaPlatformis now initialized via
JavaPlatform.Configwhich introduces a number of new configuration options.
GameActivityprovides calldown methods for computing the default
Bitmap.Configto use when loading images.
BitmapOptionsAdjusterfor controlling the
Bitmap.Config(and other options) on an image-by-image basis when your images are loaded.
ios/pom.xmlto use ikvm-maven-plugin 1.1.4.
UIViewon which native controls can be overlayed atop the game view.
IOSPlatform.rootViewControllerprovides access to the root view controller. This is needed to push new views over the game view, like the Game Center view.
## PlayN v1.4
* Can now receive notifications when game is paused/resumed and will exit:
* Added per-layer touch event handling: Layer
* Per-layer mouse event handling now uses Mouse.LayerListener which supports
* Added clipped group layers:
* 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.
now returns null for non-existent keys, not an empty array.
* Removed a great deal of previously deprecated methods (Canvas.
TextLayout effects, etc.).
* Various fixes to
* Fixed issues with clipped layers with non-zero origin.
* Improved error reporting to
Sound resource listeners on
JavaPlatform.registerHeadlessfor use when using the JavaPlatform in unit tests. This allows one to run unit tests without configuring the LWJGL native libraries.
JavaAssets.setAssetScalefor testing downscaled assets.
HtmlPlatformis now configured using [HtmlPlatform.Configuration], which includes configuration for alpha transparency of the game canvas and anti-aliasing.
Pointernow correctly supports devices with both touch and mouse input.
## PlayN v1.3.1
clearTexturefor when one needs to free graphics memory without waiting around for GC to trigger it.
get/postasynchronous to match other backends.
* Changed Image.width/height
and [http://docs.playn.googlecode.com/git/javadoc/playn/core/Canvas.html Canvas.width/height]
float width and height and rounds up to an
int width/height for you.
* Added PlayN.invokeLater.
* Added Path.bezierTo, removed [Path].
* Added Canvas.stroke/fillRoundRect.
* Added Image.getRgb.
* Added Image.Region.setBounds.
* Added Image.transform.
* Added Mouse.MotionEvent.dx/dy.
Only works on Java backend currently.
* Allow supplying null to
Image.setImage to clear out
* Added Mouse.hasMouse and
strokeText and Canvas.
Effects can now be achieved using
* Updated Pythagoras dependency to 1.2.
* Fixed problem where
GroupLayer would be marked as non-interactive if it had listeners but no
* Fixed issue where
Sound.addCallback would not
properly notify callbacks after the sound was loaded.
java/pom.xmlfile based on the latest archetype.
err/outon iOS 5.
crossdomain.xmlfiles when loading images.
## PlayN v1.2
* Added mouse and pointer dispatch to layers. See
* Added Image.subImage,
setSourceRect and ImageLayer.
* Added Image.toPattern,
* Added Canvas.createPath,
* 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
value(float) methods from
JsonSink. They are
properly handled by
value(Number) and these overrides were actually causing problems by
PlayN.assetManager methods (deprecated in v1.1). Use
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.
CanvasLayer was spared the axe in this release, but it’s going away in the next release. Update your code!
isEmptywhich is not available on older Android versions.
?glerrors=checkto the URL.
play()before the sound has loaded no longer causes the Flash sound to auto play once it loads.
iossubmodule to standard PlayN Maven archetype. There are still some wrinkles, but it’s a lot easier to use the iOS backend now.
CanvasImageinstead of the (deprecated in v1.1)
## PlayN v1.1.1
keys). Certain backends that were returning a view were changed not to do so.
Netwhen response length exceeds 4096 bytes.
* Json interface was rewritten:
* Moved from json.org’s parser to a more sane parser that matches the behavior of web mode’s
* 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
* 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
CanvasLayer was deprecated. Use
CanvasImage in conjunction with ImageLayer. This
combination provides a superset of
replaceWith was removed.
AssetManager) was deprecated, use
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.
* 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
* 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 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.
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.
* Added support for loading assets asynchronously to mimic the behavior of the HTML backends. Set
playn.java.asyncLoad system property to enable async loading. For example:
-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
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.
JavaGameClassNameto further communicate expected capitalization and naming convention.
We weren’t making nice release notes back in these days.