Analytics
and RegExp
services were removed.setSize/setWidth/setHeight
.width/height
on an image layer with no image, but for which the width/height was manually set.HtmlPlatform.Config.rootId
for using a root element id other than playn-root
.derive(float size)
.GroupLayer.destroyAll
, renamed clear
to removeAll
.getBytes
and Assets.getBytesSync
. Not implemented on HTML/Flash backends (due to
platform limitations in HTML’s case).TextFormat.antialias
to allow disabling of antialiasing when rendering text. Doesn’t work
on HTML backend because it’s impossible to disable antialiasing in HTML5.TextLayout.text
which tells you what text will be rendered by a TextLayout
.layoutText(String,TextFormat,TextWrap)
which returns one TextLayout
instance
for each line. The old mechanism where a single TextLayout
could represent many lines of text
is deprecated.TextBlock
for rendering centered/left/right-aligned multiline text.convertImagesOnLoad
which 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.Storage
implementation 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.emulateTouch
for 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-java
backend, 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.appName
which configures the name of the native app running your PlayN game.GameActivity.makeWindowFlags
to allow customizing window flags (e.g. reinstate status
bar).Canvas
and HiDPI mode.Typeface
instance; this is needed if you
want to register one of the Android default fonts for use in your game.preload
work properly for SFX.fillText
work when a fill gradient is configured.IOSPlatform.OrientationChangeListener
for 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.getSound
are now played via OpenAL, which is substantially higher
performance than the old AVAudioPlayer mechanism. AVAudioPlayer is still used for
Assets.getMusic
because that’s what it’s for. See the migration guide for new requirements for
CAFF and AIFC files.java.library.path
.CanvasImage
image data to GPU.mvn package
now creates standalone jar file which runs your game.android-maven-plugin
3.6.0 which accommodates tool rearrangements in
latest Android SDK.Canvas
stroke width, cap, etc. not being saved and restored.Event.capture
which 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.SurfaceImage
(originally in SurfaceLayer
). No longer will
the last rendered surface sometimes not show up.SurfaceImage
, deprecated SurfaceLayer
. SurfaceImage
allows 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 SurfaceImage
to 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.Game
interface. Now Game.Default
implements the previously mandated
update
/paint
model (and improves rendering smoothness for that model), and the bare Game
interface allows a Game
to implement whatever approach to separating physics from rendering
that a game desires. See the Migrating16to17 for the code changes needed
to use Game.Default
Clock
to simplify life for libraries and games that need to handle interpolation of
update/paint times.PlayN.tick
which returns a high-precision timestamp that’s useful for animation.Builder
which 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).setRepeat
and 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 Pattern
to honor an images repeat configuration (partially implemented).setMipmapped
for using mipmaps to improve quality of downscaled images on GL-based
backends.glTex(Sub)Image2D
moved to GLContext.tex(Sub)Image2D
.IndexedTrisShader
is now easier to extend/customize.ResourceCallback
to
Callback
, you’re going to have to do it now.setTransform
( Canvas.setTransform
was deprecated in the 1.6 release and
Surface.setTransform
should also have been deprecated, but was missed).playn-jbox2d
now pulls in org.jbox2d:jbox2d-library:2.2.1.1
which is GWT-compatible. See
Migrating16to17 for the changes you’ll need to make to your project
configuration.WebSocket
implementation. Previously only binary messages
worked. Has anyone actually used web sockets?WebSocket
implementation for Android.IOSPlatform.Config.interpolateCanvasDrawing
which can be set to false to disable
interpolation on Retina devices (which is useful for pixel-art style games).getRGB
on Retina devices. It now no longer interpolates pixels.drawPoint
on Retina devices. It now draws a proper square pixel.monotouch-maven-plugin
which allows one to build and deploy iOS apps
without having to use MonoDevelop (command line building unfortunately requires the Xamarin.iOS
“business license”).setTint
and Layer.tint
.setMinLevel
to allow suppressing log messages below a certain level. (Recommended by
Google for Android release builds.)release
for releasing audio resources sooner than waiting for GC to do it.getMusic
which allows backends to make some optimizations relating to large audio
files.setSize
was removed, and special setSize
methods were added to individual platform
backend code that can reasonably support them (e.g. HtmlGraphics.setSize
).Stats
for debugging rendering performance on GL backends. (See Triple Play’s
HUD class for an easy way to display these stats.)setTransform
because it interacts poorly with automatic scale factor
management in HiDPI modes.CanvasImage.snapshot
which can be used to create an immutable snapshot of a canvas image
which has higher render performance.TextLayout.ascent/descent/leading
for cases where an app needs to know more about the
text that will be rendered by a TextLayout
(for underlining, for example).Writer.useVerboseFormat
to cause the JSON writer to generate pretty printed output
(rather than compact, everything on one line output).HtmlAssets.ImageManifest
which can be used to pre-load the dimensions of all images known
to your app, and enable Assets.getImageSync
to (sort of) work in the HTML backend. A wiki
article explaining this will be forthcoming.HtmlPlatform.Config.scaleFactor
and
HtmlAssets.setAssetScale
.HtmlGraphics.registerFontMetrics
for overriding the (hacky) measurement of font line
height.html/pom.xml
. See playn-samples for an example.AndroidGraphics.setCanvasScaleFunc
which allows games to use lower resolution canvas
images if desired. This is useful on devices with low memory.AndroidAssets.BitmapOptions
which allows games to downsample images if desired. This is
useful on devices with low memory.GameActivity.prefsName
for customizing the name of the Android preferences file.GameActivity.logIdent
for customizing the Android log identifier. It defaults to playn
which is what was hard-coded before.SoundPool
. Music (large audio files) still relies on the old
more-hardware-resource-intensive approach.IOSPlatform.Config
for specifying configuration options.IOSPlatform.Config.frameInterval
for specifying target FPS on iOS.IOSImage.toUIImage
for custom platform code that needs to manipulate an image loaded via
IOSAssets.getImage
.gwt-user
Maven dependency.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.layoutText
now allows the empty string. It yields a TextLayout
with width 0 and a
height appropriate for the configured font.getImageSync
can be used for synchronous image loading on platforms that
support it (iOS/Java/Android).getTextSync
can 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.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).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 getLong
.JavaPlatform
is now initialized via JavaPlatform.Config
which introduces a number of new configuration options.GameActivity
provides calldown methods for computing the default Bitmap.Config
to use when
loading images.AndroidAssets
provides a BitmapOptionsAdjuster
for controlling the Bitmap.Config
(and other
options) on an image-by-image basis when your images are loaded.ios/pom.xml
to use ikvm-maven-plugin 1.1.4.IOSPlatform.uiOverlay
provides a UIView
on which native controls can be overlayed atop the
game view.IOSPlatform.rootViewController
provides access to the root view controller. This is needed to
push new views over the game view, like the Game Center view..addListener(Touch.LayerListener)
.onMouseOver
,
onMouseOut
and onMouseWeheelScroll
.setTextureFilter
for configuring image scaling filter on GL-based backends.isEnabled/setEnabled
, same for Touch and Pointer.ensureTexture
as a public API.drawText
, Graphics.createPath
,
Graphics.createPattern
, CanvasLayer
, TextLayout
effects, etc.).GL20
implementations.JavaPlatform.registerHeadless
for use when using the JavaPlatform in unit tests. This
allows one to run unit tests without configuring the LWJGL native libraries.JavaAssets.setAssetScale
for testing downscaled assets.HtmlPlatform
is now configured using [HtmlPlatform.Configuration], which includes configuration
for alpha transparency of the game canvas and anti-aliasing.Pointer
now correctly supports devices with both touch and mouse input.post/get
.clearTexture
for when one needs to free graphics memory without waiting
around for GC to trigger it.draw/fillRoundRect
.get/post
asynchronous to match other backends.getText
threading issue.int
to float
.
*
Graphics.createImage/createSurface
now accepts float
width and height and rounds up to an int
width/height for you.arcTo
.strokeText
and Canvas.fillText
.stroke/fillText
.GroupLayer
would be marked as non-interactive if it had listeners but no
interactive children.java/pom.xml
file based on the latest archetype.JavaPlatform.register
.AndroidGraphics.registerFont
.err/out
on iOS 5.crossdomain.xml
files when loading images.AntiAliasType.ADVANCED
.setSourceRect
and ImageLayer.clearSourceRect
.createPattern
.createPath
.ResourceCallback
properly contravariant in their type parameter. For
example
Image.addCallback(ResourceCallback).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
.PlayN.assetManager
methods (deprecated in v1.1). Use
PlayN.assets
method.Note: the following are provisional interfaces, not fully implemented, and subject to change:
Note also: CanvasLayer
was spared the axe in this release, but it’s going away in the next release. Update your code!
isEmpty
which is not available on older Android versions.HtmlInternalTransform.clone
.?glerrors=check
to the URL.play()
before the sound has loaded no longer causes the Flash sound to auto play once it
loads.ios
submodule to standard PlayN Maven archetype. There are still some wrinkles, but it’s
a lot easier to use the iOS backend now.DebugDrawBox2D
to use CanvasImage
instead of the (deprecated in v1.1) CanvasLayer
.keys
). Certain backends
that were returning a view were changed not to do so.Net
when response length exceeds 4096 bytes.TypedArray
.New features:
ImmediateLayer
API may evolve slightly based on feedback as it is a new API.PlayN.assetManager
).Obsoleted:
CanvasLayer
was deprecated. Use CanvasImage
in conjunction with ImageLayer. This
combination provides a superset of CanvasLayer
functionality.replaceWith
was removed.PlayN.assetManager
(and AssetManager
) was deprecated, use PlayN.assets
(and Assets
)
instead.New features:
Bug fixes:
preventDefault
called on them automatically now. This prevents undesirable
scrolling and other weird behavior on mobile browsers.playn-html
no longer exports an inappropriate dependency on
gwt-user
.playn-html
no longer exports a dependency on GAE jars.
Those dependencies are added to projects created via the Maven archetype.New features:
.mp3
files for audio instead of .wav
files. All backends in
PlayN now use MP3 encoding.Bug fixes:
New features:
New features:
playn.java.asyncLoad
system property to enable async loading. For example: mvn
-Dplayn.java.asyncLoad test -Ptest-java
.Bug fixes:
gameName
to JavaGameClassName
to further communicate expected
capitalization and naming convention.We weren’t making nice release notes back in these days.