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.
CanvasImageimage data to GPU.
mvn packagenow creates standalone jar file which runs your game.
android-maven-plugin3.6.0 which accommodates tool rearrangements in latest Android SDK.
Canvasstroke width, cap, etc. not being saved and restored.
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:188.8.131.52which 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”).
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
setSizeis 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-rootdiv. The size in Flash is configured by the size of the
objectelement that displays your Flash movie.
layoutTextnow allows the empty string. It yields a
TextLayoutwith width 0 and a height appropriate for the configured font.
getImageSynccan be used for synchronous image loading on platforms that support it (iOS/Java/Android).
getTextSynccan be used for synchronous text loading on platforms that support it.
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.
getRemoteImageallows loading images from URLs.
Assetsno longer caches assets on any platform. Use
Assetsmethods for watching loaded assets are deprecated. Use
AssetWatcher.Listeneris now an abstract class and has a
Callbackis now used in its place.
Netcallbacks now report
HttpExceptionon failure, which includes the HTTP status code.
Pointernow also reports cancelled events (which happen on Android/iOS).
setPropagateEventscan 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.
Collectorallows one to intercept all PlayN log messages (for sending over the network with bug reports, say).
Storageprovides an interface for batch setting/deleting properties, which dramatically increases performance on Android when updating hundreds or thousands of properties at once.
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.
setTextureFilterfor configuring image scaling filter on GL-based backends.
isEnabled/setEnabled, same for Touch and Pointer.
ensureTextureas a public API.
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.
clearTexturefor when one needs to free graphics memory without waiting around for GC to trigger it.
get/postasynchronous to match other backends.
float. * Graphics.createImage/createSurface now accepts
floatwidth and height and rounds up to an
intwidth/height for you.
GroupLayerwould be marked as non-interactive if it had listeners but no interactive children.
java/pom.xmlfile based on the latest archetype.
err/outon iOS 5.
crossdomain.xmlfiles when loading images.
ResourceCallbackproperly contravariant in their type parameter. For example Image.addCallback(ResourceCallback).
value(float)methods from JsonSink. They are properly handled by
value(Number)and these overrides were actually causing problems by (silently) promoting
PlayN.assetManagermethods (deprecated in v1.1). Use PlayN.assets method.
Note: the following are provisional interfaces, not fully implemented, and subject to change:
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)
keys). Certain backends that were returning a view were changed not to do so.
Netwhen response length exceeds 4096 bytes.
ImmediateLayerAPI may evolve slightly based on feedback as it is a new API.
CanvasLayerwas deprecated. Use
CanvasImagein conjunction with ImageLayer. This combination provides a superset of
AssetManager) was deprecated, use
preventDefaultcalled on them automatically now. This prevents undesirable scrolling and other weird behavior on mobile browsers.
playn-htmlno longer exports an inappropriate dependency on
playn-htmlno longer exports a dependency on GAE jars. Those dependencies are added to projects created via the Maven archetype.
.mp3files for audio instead of
.wavfiles. All backends in PlayN now use MP3 encoding.
playn.java.asyncLoadsystem property to enable async loading. For example:
mvn -Dplayn.java.asyncLoad test -Ptest-java.
JavaGameClassNameto further communicate expected capitalization and naming convention.
We weren’t making nice release notes back in these days.