mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
Updated readme for 2.0.4 release.
This commit is contained in:
parent
1d37cde66f
commit
010c2de41b
2 changed files with 126 additions and 24 deletions
112
CHANGELOG.md
112
CHANGELOG.md
|
@ -2,8 +2,118 @@
|
|||
|
||||
There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system.
|
||||
|
||||
## Version 2.0.4 - "Mos Shirare" - in development
|
||||
## Version 2.0.4 - "Mos Shirare" - 29th April 2014
|
||||
|
||||
### Updates
|
||||
|
||||
* Updated to [Pixi.js 1.5.3](https://github.com/GoodBoyDigital/pixi.js/releases/tag/v1.5.3)
|
||||
* Updated to latest [p2.js](https://github.com/schteppe/p2.js/commits/master) - all commits from 0.5.0 to Apr 27th 2014.
|
||||
* TypeScript definitions fixes and updates (thanks @clark-stevenson @metrofun @killalau)
|
||||
* Timer has removed all use of local temporary vars in the core update loop.
|
||||
* The Input.reset `hard` reset parameter is now passed down to the Keyboard and Key reset methods.
|
||||
* AnimationManager.destroy now iterates through child animations calling destroy on all of them, avoiding a memory leak (thanks stauzs)
|
||||
* AnimationManager.play will now call Animation.stop on the current animation before switching to the new one (thanks @nihakue, #713)
|
||||
* ArcadePhysics.Body.phase is checked in postUpdate to prevent it from being called multiple times in a single frame.
|
||||
* Group.setProperty will now check if the property exists before setting it, this applies to Group.setAll and anything else using setProperty internally.
|
||||
* QuadTree.retrieve now checks to see if the given Sprite has a body before carrying on.
|
||||
* ArcadePhysics.collideSpriteVsGroup checks if Sprite has a body before carrying on, now safely skips sub-groups or other non-Sprite group children.
|
||||
* Group.remove now checks the child to see if it's a member of the root Group before removing it, otherwise Pixi throws an Error.
|
||||
* The Emitter no longer checks if minParticleScale = maxParticleScale for the scale check, allowing for fixed scale particles again.
|
||||
* The PIXI.AbstractFilter is now included in the Phaser Pixi build by default, allowing for easier use of external Pixi Filters.
|
||||
* All Game Objects have a new property: destroyPhase (boolean) which is true if the object is in the process of being destroyed, otherwise false.
|
||||
* If Tween.yoyo was true but repeat was 0 then it wouldn't yoyo. Now if yoyo is set, but not repeat, the repeat count gets set to 1 (thanks @hilts-vaughan, fix #744)
|
||||
* RandomDataGenerator.integerInRange uses a new method of rounding the value to an integer to avoid distribution probability issues (thanks PhaserFan)
|
||||
* Updated the Device little / big endianess check.
|
||||
* Time has been updated so that physicsElapsed can never be zero (falls back to 1/60), also fixes p2 elapsed time bug (thanks @georgiee, fix #758)
|
||||
* Input and Pointer now use the new ArrayList instead of a LinkedList, which resolve list item removable during callback issues.
|
||||
* Input.reset no longer resets every interactive item it knows of, because they are removed during the destroy phase and can now persist between States if needed.
|
||||
* Blank Tilemaps no longer create `null` tiles, but instead create Tile objects with an index of -1 which can be replaced and updated like any other tile.
|
||||
* Tilemap.addTilesetImage will now raise a console.warn if you specify an invalid tileset key and not create the tileset rather than pick the default set.
|
||||
* Math.smoothstep and Math.smootherstep have been updated to work regardless if a is > or < b (thanks @gre, fix #772)
|
||||
* Text.updateText now sets the lineCap to `round` to avoid occassional font glitching issues in Chrome.
|
||||
|
||||
### New Features
|
||||
|
||||
* New Phaser Project Template specifically for requireJS in the `resources/Project Templates` folder (many thanks @ashatch)
|
||||
* Loader now has an onFileStart event you can listen for (thanks @codevinsky, #705)
|
||||
* Group.classType allows you to change the type of object that Group.create or createMultiple makes from Phaser.Sprite to your own custom class.
|
||||
* Timer.clearPendingEvents will purge any events marked for deletion, this is run automatically at the start of the update loop.
|
||||
* Device.crosswalk detects if your game is running under Intels Crosswalk XDK.
|
||||
* Keyboard.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
|
||||
* Key.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
|
||||
* InputManager.resetLocked - If the Input Manager has been reset locked then all calls made to InputManager.reset, such as from a State change, are ignored.
|
||||
* Group.resetCursor will reset the Group cursor back to the start of the group, or to the given index value.
|
||||
* World.wrap will take a game object and if its x/y coordinates fall outside of the world bounds it will be repositioned on the opposite side, for a wrap-around effect.
|
||||
* Device.support32bit is a new boolean that sets if the context supports 32bit pixel manipulation using array buffer views or not.
|
||||
* P2.World now has its own pause and resume methods, so you can pause the physics simulation independent of your game (thanks @georgiee)
|
||||
* Phaser.ArrayList is a new iterative object, similar in principal to a set data structure, but operating on a single array without modifying the object structure.
|
||||
* Add scaleMode params to FilterTexture and RenderTexture (pixi.js update by @giraluna)
|
||||
* Your State can now have a pauseUpdate method, which is called constantly when the game is paused.
|
||||
* Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers (such as raf de-vis or CPU grind).
|
||||
* Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755)
|
||||
* Animation.setFrame allows you to set the animation to a specific frame (thanks @adamholdenyall, #706)
|
||||
* Point.dot - get the dot product of two Point objects.
|
||||
* Point.cross - get the cross product of two Point objects.
|
||||
* Point.cross - get the cross product of two Point objects.
|
||||
* Point.perp - make the Point perpendicular (90 degrees rotation)
|
||||
* Point.rperp - make the Point perpendicular (-90 degrees rotation)
|
||||
* Point.normalRightHand - Right-hand normalize (make unit length) a Point.
|
||||
* Point.angle - Returns the angle between this Point object and another object with public x and y properties.
|
||||
* Point.angleSq - Returns the angle squared between this Point object and another object with public x and y properties.
|
||||
* Point.getMagnitudeSq - Calculates the length squared of the Point object.
|
||||
* Point.project - Project two Points onto another Point.
|
||||
* Point.projectUnit - Project two Points onto a Point of unit length.
|
||||
* Point.multiplyAdd - Adds two 2D Points together and multiplies the result by the given scalar.
|
||||
* Point.negative - Creates a negative Point.
|
||||
* Point.interpolate - Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point.
|
||||
* Color.packPixel packs an rgb component into a single integer.
|
||||
* Color.unpackPixel unpacks an integer into a color object.
|
||||
* Color.fromRGBA converts an integer in 0xRRGGBBAA format to a color object.
|
||||
* Color.toRGBA converts rgba components into a 32-bit integer.
|
||||
* Color.RGBtoHSL converts an rgb color into hsl (hue, saturation, lightness)
|
||||
* Color.HSLtoRGB converts hsl values into an rgb color object.
|
||||
* Color.RGBtoHSV converts an rgb color into hsv (hue, saturation, value)
|
||||
* Color.HSVtoRGB converts an hsv value into an rgb color object.
|
||||
* Color.createColor - creates the new light-weight color object used by most Color conversion methods.
|
||||
* Color.updateColor - updates an existing color object to update the rgba property.
|
||||
* Color.RGBtoString converts an rgba color into a # or 0x color string.
|
||||
* Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel, you can optionally set the saturation and value amounts.
|
||||
* Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
|
||||
* BitmapData.cls clears the current context.
|
||||
* BitmapData.fill fills the context with the given color.
|
||||
* BitmapData.processPixelRGB lets you perform a custom callback on every pixel in the BitmapData by passing the pixels color object to your callback.
|
||||
* BitmapData.processPixel lets you perform a custom callback on every pixel in the BitmapData by passing the pixels color value to your callback.
|
||||
* BitmapData.replaceRGB will scan the bitmap for a specific color and replace it with the new given one.
|
||||
* BitmapData.setHSL sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.
|
||||
* BitmapData.shiftHSL shifts the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.
|
||||
* BitmapData.extract scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData.
|
||||
* BitmapData.circle draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* The main Timer loop could incorrectly remove a TimerEvent if a new one was added specifically during an event callback (thanks @garyyeap, fix #710)
|
||||
* Fixed the use of the destroy parameter in Group.removeAll and related functions (thanks @AnderbergE, fix #717)
|
||||
* P2.World.convertTilemap now correctly checks the collides parameter of the tiles as it converts them.
|
||||
* Animation.destroy didn't correctly clear the onStart, onLoop and onComplete signals.
|
||||
* StateManager.restart incorrectly skipped the first additional parameter after clearCache (thanks @mariusbrn, fix #722)
|
||||
* Line.angle and Math.angleBetween used Math.atan2 arguments in the wrong order (thanks @jotson, fix #724)
|
||||
* Group.destroy checks parent before removing (thanks @clark-stevenson, fix #733)
|
||||
* Fixed typo in P2.World.setMaterial (thanks @OpherV, fix #739)
|
||||
* InputHandler._setHandCursor private var wasn't properly set, meaning the hand cursor could sometimes remain (during destroy sequence for example)
|
||||
* Destroying an object with an input handler during its onDown event would throw Signals dispatch errors (thanks @jflowers45, fix #746)
|
||||
* Circle.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745)
|
||||
* Point.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745)
|
||||
* P2.Body.loadPolygon has been updated to correct center of mass issues (thanks @georgiee, fix #749)
|
||||
* Game checks if window.console exists before using it (should fix IE9 issues when dev tools are closed), however it is still used deeper in Pixi.
|
||||
* Masks now work when used in RenderTextures / CacheAsBitmap and Filters (pixi.js update)
|
||||
* Stroked text sometimes got clipped (pixi.js update)
|
||||
* Polygon.contains now works for coordinates to the left of the polygon (thanks @vilcans, fix #766)
|
||||
* Game pause/resume could incorrectly increment paused Timers (thanks @georgiee, fix #759)
|
||||
* Animations resuming from a pause no longer skip frames (thanks @merixstudio, fix #730)
|
||||
* Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761)
|
||||
* LoaderParser.bitmapFont updated so xml parsing works properly on IE9 (thanks @georgiee)
|
||||
* Sounds that had been paused via game code would un-mute if the game paused and resumed.
|
||||
* CSV Tilemap tiles would incorrectly set the Tile layer reference, causing collision to fail (thanks @Chapelin, fix #692)
|
||||
|
||||
|
||||
## Version 2.0.3 - "Allorallen" - 11th April 2014
|
||||
|
|
38
README.md
38
README.md
|
@ -1,48 +1,45 @@
|
|||
![Phaser 2.0](http://www.phaser.io/images/phaser2-github.png)
|
||||
|
||||
# Phaser 2.0.4-dev
|
||||
# Phaser 2.0.4
|
||||
|
||||
Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) internally for fast 2D Canvas and WebGL rendering.
|
||||
|
||||
Version: 2.0.4 "Mos Shirare" - Released: -in development-
|
||||
Version: 2.0.4 "Mos Shirare" - Released: 29th April 2014
|
||||
|
||||
By Richard Davey, [Photon Storm](http://www.photonstorm.com)
|
||||
|
||||
* View the [Official Website](http://phaser.io)
|
||||
* Follow on [Twitter](https://twitter.com/photonstorm)
|
||||
* Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)
|
||||
* Source code for 250+ [Phaser Examples](https://github.com/photonstorm/phaser-examples)
|
||||
* Source code for 300+ [Phaser Examples](https://github.com/photonstorm/phaser-examples) or [browse them online](http://examples.phaser.io)
|
||||
* Read the [documentation online](http://docs.phaser.io)
|
||||
* Browse the [Examples online](http://examples.phaser.io)
|
||||
* Join our [#phaserio IRC channel](http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/) on freenode
|
||||
|
||||
[Subscribe to our new Phaser Newsletter](https://confirmsubscription.com/h/r/369DE48E3E86AF1E). We'll email you when new versions are released as well as send you our regular Phaser game making magazine.
|
||||
[Subscribe to our new Phaser Newsletter](https://confirmsubscription.com/h/r/369DE48E3E86AF1E). We'll email you when new versions are released.
|
||||
|
||||
[![Build Status](https://travis-ci.org/photonstorm/phaser.png?branch=dev)](https://travis-ci.org/photonstorm/phaser)
|
||||
|
||||
|
||||
## What's new in 2.0.4?
|
||||
## Welcome to Phaser and What's new in 2.0.4?
|
||||
|
||||
We've had the vast majority of this version ready for a few days now, but held off releasing due to Ludum Dare 48. Ludum Dare contests are always peak times for Phaser, we see an influx of new devs downloading for the first time. So it's not the best day to release a new version :) Now that LD48 has finished we present Phaser 2.0.4. This is the latest version in our bi-weekly sprint release schedule, and the change log is (which you can see in full below) is significant to say the least.
|
||||
|
||||
We've made some deep internal changes to how game pause and resume is handled, which means Phaser.Timers now behave themselves properly. Again with this version we've updated to the latet Pixi and P2 releases, bringing new features and enhancements with them. In terms of new features we've overhauled the Color, Point and BitmapData classes, with significant new features for each of them. From HSL palette shifting and color extraction, to Point dot products to proper endianess handling in Color, the new features are powerful additions to the library. We've also marked a bunch of methods as deprecated and will remove them in Phaser 2.1. Most have fully working replacements and you'll see them flagged as such in the API docs.
|
||||
|
||||
## Welcome to Phaser
|
||||
Thanks to traffic from Ludume Dare and some [great new sites](http://gamemechanicexplorer.com), we've seen Phaser sky rocket on github; now clearing 4325 github stars and 1175 forks. In most cases issues are being resolved fast and we're closing over 97% of all those reported, which we're extremely proud about.
|
||||
|
||||
6 months ago we released Phaser 1.0 into the world. Suffice to say that since then we've been overwhelmed at the huge surge of developers taking to it! Our github repository is consistently in the top JavaScript lists, we've over 3200 stars at the time of writing, and a wonderful, vibrant and friendly community. Phaser 2 is a natural evolution of what we started. We've focused specifically on performance and expansion with this release. Lots of developers have already reported to us considerably speed increases just by swapping to Phaser 2 (reports of 200% faster speeds on mobile aren't unheard of!). There's also a full-body physics system available now, in the form of the excellent p2.js. The upgrade to Pixi 1.5 under the hood bought lots of new visual effects in, including blend modes and tints.
|
||||
For the 2.0.5 release we're going to be looking carefully at CocoonJS support, there are some known issues with it currently and we want to ensure it works as flawlessly as possible. After this we'll start planning for 2.1.
|
||||
|
||||
And we're also really pleased to have closed down over 550 issues reported on github. We literally went through every last bug reported to us, and fixed it. All kinds of little things that as a whole make the library that much more solid. With the 2.0 release we're now freezing the API. Before we have to admit that the API changed somewhat on a whim, and we moved things around and changed things without too much consideration for fellow developers. With 2.0 that stops - we've spent long enough on this release that we're now extremely happy with the organisation of classes and methods, and while we may still need to make small tweaks in the future, none of them will be API breaking without prior community approval first. This means if you're using Phaser to teach in classes, or writing a book / tutorials around it, this is the version to base off.
|
||||
We're also very close to releasing the brand new Phaser web site. The current single-page site has done us well for now, but it was only ever meant to be temporary while the full site was built. This is nearly done and we've got some exciting content to share and plenty of room for growth! Be sure to [subscribe to our monthly newsletter](https://confirmsubscription.com/h/r/369DE48E3E86AF1E) to be notified as soon as it's out.
|
||||
|
||||
If you want to port a Phaser 1.x game over to 2 then do read our [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) first.
|
||||
|
||||
So what's next? We have a roadmap (which you can find at the bottom of this document), but we're going to sit back and take stock for a while, building up the tutorials and sample games. We will of course jump on bug fixes quickly, but this is definitely the best release of Phaser ever. The most features, the fastest, the most stable and just generally the most fun to use.
|
||||
|
||||
Happy coding everyone! See you on the forums.
|
||||
Until then happy coding everyone! And we hope to see you on the forums.
|
||||
|
||||
![boogie](http://www.phaser.io/images/spacedancer.gif)
|
||||
|
||||
|
||||
## Getting Started Guides
|
||||
|
||||
We have a new [Getting Started Guide](http://phaser.io/getting-started-js.php) which covers all you need to begin developing games with Phaser. From setting up a web server to picking an IDE. If you're new to HTML5 game development, or are coming from another language like AS3, then we recommend starting there.
|
||||
We have a [Getting Started Guide](http://phaser.io/getting-started-js.php) which covers all you need to begin developing games with Phaser. From setting up a web server to picking an IDE. If you're new to HTML5 game development, or are coming from another language like AS3, then we recommend starting there.
|
||||
|
||||
We wrote a comprehensive [How to Learn Phaser](http://gamedevelopment.tutsplus.com/articles/how-to-learn-the-phaser-html5-game-engine--gamedev-13643) guide for GameDevTuts+ which covers finding tutorials, examples and support.
|
||||
|
||||
|
@ -55,7 +52,7 @@ Finally the list of [community authored Phaser Tutorials](http://www.lessmilk.co
|
|||
|
||||
## Change Log
|
||||
|
||||
Version 2.0.4 - "Mos Shirare" - in development
|
||||
Version 2.0.4 - "Mos Shirare" - 29th April 2014
|
||||
|
||||
|
||||
### Updates
|
||||
|
@ -172,11 +169,6 @@ Version 2.0.4 - "Mos Shirare" - in development
|
|||
* CSV Tilemap tiles would incorrectly set the Tile layer reference, causing collision to fail (thanks @Chapelin, fix #692)
|
||||
|
||||
|
||||
### ToDo
|
||||
|
||||
* Stage.postUpdate may update a camera tracked object twice if it's not on the root display level (which it rarely is)
|
||||
|
||||
|
||||
There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system.
|
||||
|
||||
The full Change Log is at https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md
|
||||
|
@ -228,11 +220,11 @@ Or if you prefer you can leave the protocol off, so it works via http and https:
|
|||
|
||||
Games created with Phaser require a modern web browser that supports the canvas tag. This includes Internet Explorer 9+, Firefox, Chrome, Safari and Opera. It also works on mobile web browsers including stock Android 2.x browser and above and iOS5 Mobile Safari and above.
|
||||
|
||||
If you need to support IE9 or Android 2.x then you must use a build of Phaser that doesn't include P2 physics. You'll find these in the `build/custom` folder.
|
||||
If you need to support IE9 or Android 2.x and want to use P2 physics then you must use the polyfill found in the `resources/IE9 Polyfill` folder. If you don't require P2 Physics then you don't need this polyfill.
|
||||
|
||||
For developing with Phaser you can use either a plain-vanilla JavaScript approach or [TypeScript](https://typescript.codeplex.com/) using the provided TypeScript definitions file. We made no assumptions about how you like to code your games, and were careful not to impose any form of class/inheritance/structure upon you.
|
||||
|
||||
Phaser is 576 KB minified (including all 3 physics engines, 311 KB without) and 128 KB gzipped (67 KB without physics libs).
|
||||
Phaser is 128 KB gzipped (576 KB minified) when including all 3 physics engines. Without the physics engines its 67 KB gzipped (311 KB minified)
|
||||
|
||||
|
||||
## Learn By Example
|
||||
|
|
Loading…
Reference in a new issue