rich Posted May 20, 2014 Share Posted May 20, 2014 Hi everyone, Here is the next point release of Phaser: 2.0.5. Again a nice bundle of updates, bug fixes and new features. We've also updated the roadmap and organise and prioritise some features. There will be one final point release (2.0.6) and then we'll switch over to 2.1 and start implementing some of the bigger updates and removing a few deprecated ones. The online docs and examples have all been updated to 2.0.5. There are some big changes inbound for Pixi.js and p2.js, which I'm looking forward to integrating with Phaser when they both release their next versions. Things like awesome new Graphics capabilities and mask handling, and the return of some long-lost friends like Rope and Strip. As always grab the latest release from github: https://github.com/photonstorm/phaser Here is the change log:Version 2.0.5 - "Tanchico" - 20th May 2014### Updates* TypeScript definitions fixes and updates (thanks @luispedrofonseca @clark-stevenson @Anahkiasen @adamholdenyall @luispedrofonseca @WillHuxtable)* Input.getPointerFromIdentifier docs update to reflect where the identifier comes from. Pointer properties now set to give it fixed defaults (thanks @JirkaDellOro, #793)* Pointer.pointerId added which is set by the DOM event (if present in the browser). Note that browsers can and do recycle pointer IDs.* Pointer.type and Pointer.exists properties added.* QuadTree.retrieve can now accept either a Sprite with a physics body or a Phaser.Rectangle as its parameter.* PluginManager.add now accepts additional parameters and if given a function it will pass them all to the Plugin constructor.* Tilemap.getTile has a new nonNull parameter. If true it won't return `null` for empty tiles, but will return the actual Tile in that location.* Math.interpolateAngles and Math.nearestAngleBetween have been removed for the time being. They threw run-time errors previously.* PIXI.InteractionManager is no longer over-written if the object already exists (thanks @georgiee, #818)* Key.justPressed and justReleased incorrectly set the delay value to 2500ms. Now defaults to 50ms (thanks @draklaw, fix #797)* Stage.backgroundColor can now accept short-code hex values: `#222`, `#334`, etc.* Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.* Stage.bounds is now updated if the game canvas offset changes position. Note that it contains the un-scaled game dimensions.### New Features* New `force` parameter added to Group.set, setAll, setAllChildren, setProperty which controls if a property is created even if it doesn't exist.* Group.hasProperty will check a child for the given property and return true if it exists, otherwise false.* Phaser.Tween.from allows you to set tween properties that will end up where the current object is (thanks @codevinsky, #792)* Input.getPointerFromId will return a pointer with a matching pointerId value, if any. pointerId is a value set by the browser in the DOM event.* ArcadePhysics.getObjectsUnderPointer will return all children from a Group that overlap with the given Pointer.* InputManager.minPriorityID lets you set the minimum priority level an object needs to be to be checked by a Pointer. Useful for UI layer stacking.* New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with plugins and generally just handy to have.* BitmapData.processPixelRGB added undefined check (thanks @muclemente, fix #808)* Phaser.Utils.transposeArray will transpose the given array and return it.* Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it.* BitmapData.rect provides a quick way to draw a Rectangle to a BitmapData.* Button.onOverMouseOnly is a boolean that causes onOver events to fire only if the pointer was a mouse (i.e. stops onOver sounds triggering on touch)* Tilemap.setCollision has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819)* Tilemap.setCollisionBetween has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819)* Tilemap.setCollisionByExclusion has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819)* Tilemap.setCollisionByIndex has a new boolean parameter 'recalculate' which lets you control recalculation of collision faces (thanks @max-m, #819)* Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795)* Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795)* The Tiled JSON parser will now include Tiled polygons, ellipse and rectangle geometry objects in the resulting map data (thanks @tigermonkey, #791)* Input.addMoveCallback allows you to bind as many callbacks as you like to the DOM move events (Input.setMoveCallback is now flagged as deprecated)* Input.deleteMoveCallback will remove a previously set movement event callback.* Mouse will now check if it's over the game canvas or not and set Pointer.withinGame accordingly.* Mouse.mouseOutCallback callback added for when the mouse is no longer over the game canvas.* Mouse.stopOnGameOut boolean controls if Pointer.stop will be called if the mouse leaves the game canvas (defaults to false)* Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters.* Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer)* Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean.* Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal)* Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal)* New movement data added for a Pointer Locked mouse (Pointer.movementX/Y) (thanks @woutercommandeur, #831)* ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account.### PluginsThe Plugins have now all moved to [their own repository](https://github.com/photonstorm/phaser-plugins)### Bug Fixes* Line.pointOnLine corrected algorithm (thanks @woutercommandeur, fix #784)* Line segment collision fails under certain cicumstances (thanks @woutercommandeur, fix #760)* The P2 DistanceConstraint method signature has changed. Updated Phaser so maxForce is now passed as object (fix #788)* Moved the this._reversed flag outside of the property loop in Tween (as per tween.js issue 115)* Emitter.makeParticles updated to use Array.isArray() check on the key/frame values, so non-string objects can be passed in (thanks @AnderbergE, fix #786)* Tilemap.createFromObjects will now force the creation of the property again even if it doesn't exist (regression fix from 2.0.4)* Phaser.Line.intersectsPoints fixed by properly checking the boundaries (thanks @woutercommandeur, fix #790)* Group.set and setAll were changed in 2.0.4 to not create the property unless it existed. This broke backwards compatibility, so has been fixed.* Sound.play now returns the Sound object (thanks @AnderbergE, fix #802)* Device Silk UA test updated to avoid Safari conflict (thanks @jflowers45, fix #810)* Sound.stop on Samsung S4 would randomly throw a DOM error. Wrapped the audio stop in a try/catch (thanks FSDaniel)* RandomDataGenerator.integerInRange would return a non-integer value if you passed in a float.* Timer class updated so that code-resumed pauses don't mess up the internal _pausedTotal value (thanks @joelrobichaud, fix #814)* Timer class when paused by code after a game-level pause wouldn't set the codepaused flag (thanks @joelrobichaud, fix #814)* Stage.backgroundColor now properly accepts hex #RRGGBB and color values 0xRRGGBB again (fix #785)* Color.getRGB would return incorrect color components if a color value without alpha was given, now works with both 0xRRGGBB and 0xAARRGGBB.* Color.getWebRGB now works regardless if you give an 0xRRGGBB or 0xAARRGGBB color value.* If an object was drag enabled with bringToTop, the onDragStop event wouldn't fire until the mouse was next moved (thanks @alpera, fix #813)* RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.* RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.* Group.hasProperty fixed to not use hasOwnProperty, but a series of `in` checks (thanks @mgiuffrida for the idea, #829)* Tilemap.removeTile sets tiles to null but should set to index of -1 (thanks @draklaw, fix #835) Pedro Alpera, KevinnFtw, Arlefreak and 7 others 10 Link to comment Share on other sites More sharing options...
Starboar Posted May 20, 2014 Share Posted May 20, 2014 Thanks for all your work on this Link to comment Share on other sites More sharing options...
Zaidar Posted May 20, 2014 Share Posted May 20, 2014 Yeeeeeeah nice ! I will never say thanks enough for every release ! Kudos to all contributors. Link to comment Share on other sites More sharing options...
Mike Posted May 20, 2014 Share Posted May 20, 2014 Cool news. And for the plugins, everyone should try to make one plugin themself. Starboar, Arlefreak and Heppell08 3 Link to comment Share on other sites More sharing options...
presidenten Posted May 20, 2014 Share Posted May 20, 2014 Does this version include the fixes for Cocoon JS like planned, or is that going in 2.0.6? Link to comment Share on other sites More sharing options...
rich Posted May 20, 2014 Author Share Posted May 20, 2014 If it's not on the list, it's not in there I'm afraid. Link to comment Share on other sites More sharing options...
presidenten Posted May 20, 2014 Share Posted May 20, 2014 Well, with the release tempo you got going for you, it will be there soon enough. Its a big set of updates anyhow. Link to comment Share on other sites More sharing options...
rich Posted May 20, 2014 Author Share Posted May 20, 2014 I started Cocoon testing in earnest today and will keep the forum updated with progress. presidenten 1 Link to comment Share on other sites More sharing options...
triptych Posted May 20, 2014 Share Posted May 20, 2014 Just FYI I was reading the news on the Phaser website, and the link to slush has moved (that link no longer valid). I believe the new repo is here? https://github.com/slushjs/slush Link to comment Share on other sites More sharing options...
lokhmakov Posted May 20, 2014 Share Posted May 20, 2014 Bug in phaser.d.ts:3507 duation: number;Should: duration: number; Link to comment Share on other sites More sharing options...
danbruegge Posted May 21, 2014 Share Posted May 21, 2014 the cdnjs link to phaser 2.0.5 gives me a 404 error! Rich, can you check this? https://twitter.com/danbruegge/status/468801373237432320 Link to comment Share on other sites More sharing options...
danbruegge Posted May 22, 2014 Share Posted May 22, 2014 the cdnjs link to phaser 2.0.5 gives me a 404 error! Rich, can you check this? https://twitter.com/danbruegge/status/468801373237432320 Or is it just me? Link to comment Share on other sites More sharing options...
Zaidar Posted May 22, 2014 Share Posted May 22, 2014 I think Rich isn't the one who update the CDN, but it's someone from the forum. I can't find the topic i'm afraid. Link to comment Share on other sites More sharing options...
neon Posted May 22, 2014 Share Posted May 22, 2014 I was always astonished by the development speed of phaser. Thanks for all the afford. Link to comment Share on other sites More sharing options...
Rafarel Posted May 23, 2014 Share Posted May 23, 2014 Really good job, I'll update my game right now For the CocoonJS compatibility, I made a lot a tests.My major issue is that I can't draw a sprite on a bitmapdata when I use webgl mode, so I use webview+.Keep up the good work ! Link to comment Share on other sites More sharing options...
OpherV Posted May 26, 2014 Share Posted May 26, 2014 Awesome work Rich! Really looking forwards to the next release though, since this release has two bug regressions that already got solved:1. this Pixi bug with filters & masks2. this P2 physics bug with contact events Link to comment Share on other sites More sharing options...
Recommended Posts