You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
7
7
8
-
Version: 1.1.3 "Arafel" - Released: November 29th 2013
By Richard Davey, [Photon Storm](http://www.photonstorm.com)
11
11
@@ -14,98 +14,51 @@ Follow on [Twitter](https://twitter.com/photonstorm)<br />
14
14
Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)<br />
15
15
Try out 160+ [Phaser Examples](http://gametest.mobi/phaser/examples/)
16
16
17
-
[Un-official Getting Started with Phaser](http://www.antonoffplus.com/coding-an-html5-game-for-30-minutes-or-an-introduction-to-the-phaser-framework)
18
-
19
17
[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.
20
18
19
+
21
20
Welcome to Phaser
22
21
-----------------
23
22
24
-
It's staggering to think just how much has been achieved in the short time Phaser has been alive. We've implemented literally hundreds of bug fixes and updates, thanks to the effort the community puts in to reporting issues they find. Exciting new features have been merged into the core and we revisited old ones and pimped them out. We also completely overhauled the Examples Suite, removed the requirement for PHP, rebuilt it and filled it with over 150 examples to dig in and learn from. And more importantly we've got our first pass at the API docs ready too.
25
-
26
-
There is still more to be done of course. The API docs, while a good start, are lacking in places and still need to be backed up with a proper comprehensive manual. And we desperately need to write some 'best practises' and 'getting started' tutorials too. But we hope you appreciate the amount of effort that has been put in by the team so far.
23
+
Over 1000 github stars! Wow! The latest release of Phaser represents another hard months work by the development team and the community at large. We've had some great contributions and have not let-up the pace of innovating and pushing Phaser forward. As we march towards the end of 2013 we do so knowing that with every passing month more and more developers are using Phaser, and more games are being made. All while it is getting stronger with each release.
27
24
28
-
There are many exciting new features and tweaks in this build that we felt it warranted a proper point release, hence the shift to version 1.1. Because of several core changes games that were in development in a 1.0.x version of Phaser may need refactoring for 1.1, but we feel those changes have helped the framework grow and mature as a whole.
25
+
Our plan is to end 2013 with one final point release (1.1.4 - "Kandor") and then we'll start planning out the features we wish to see in version 1.2 in the New Year.
29
26
30
-
As before we offer a heart-felt "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available: you are our heroes. It's your kind words and enthusiasm that has kept us going.
27
+
As always we offer a heart-felt "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available back then: you are our heroes. It's your kind words and enthusiasm that has kept us going.
31
28
32
29
Phaser is everything we ever wanted from an HTML5 game framework. It powers all of our client work in build today and remains our single most important product, and we've only just scratched the surface of what we have planned for it.
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.
40
38
39
+
There is also this great [Un-official Getting Started Guide](http://www.antonoffplus.com/coding-an-html5-game-for-30-minutes-or-an-introduction-to-the-phaser-framework) which is well worth running through as well.
40
+
41
+
41
42
Change Log
42
43
----------
43
44
44
-
Version 1.1.3 - "Arafel" - November 29th 2013
45
-
46
-
* New: Added a .jshintrc so contributions can be run through JSHint to help retain formatting across the library (thanks kevinthompson)
47
-
* New: The entire Phaser library has been updated to match the new JSHint configuration.
48
-
* New: Added a new in-built texture. Sprites now use __default if no texture was provided (a 32x32 transparent PNG) or __missing if one was given but not found (a 32x32 black box with a green cross through it)
49
-
* New: Phaser.Filter. A new way to use the new WebGL shaders/filters that the new version of Pixi supports.
50
-
* New: Phaser.BitmapData object. A Canvas you can freely draw to with lots of functions. Can be used as a texture for Sprites. See the new examples and docs for details.
51
-
* New: Loader can now load JavaScript files. Just use game.load.script('key', 'url') - the file will be turned into a script tag in the document head on successful load.
52
-
* New: RenderTexture.render now takes a Phaser.Group. Also added renderXY for when you don't want to make a new Point object.
53
-
* New: Physics.overlap now supports Sprites, Groups or Emitters and can perform group vs. group (etc) overlap checks with a custom callback and process handler.
54
-
* New: Added Sound.externalNode which allows you to connect a Sound to an external node input rather than the SoundManager gain node.
55
-
* New: Added SoundManager.connectToMaster boolean. Used in conjunction with Sound.externalNode you can easily configure audio nodes to connect together for special effects.
* New: scrollFactorX/scrollFactorY have been added to TilemapLayers (thanks jcd-as)
58
-
* New: Phaser.Game parent can now be an HTMLElement or a string (thanks beeglebug)
59
-
* New: Now using the latest version of Pixi.js. Which means you can use all the sexy new WebGL filters :)
60
-
* New: Sprite.animations.getAnimation will return an animation instance which was added by name.
61
-
* New: Added Mouse.button which is set to the button that was pressed: Phaser.Mouse.LEFT_BUTTON, MIDDLE_BUTTON or RIGHT_BUTTON (thanks wKLV)
62
-
* New: Added Mouse.pointerLock signal which you can listen to whenever the browser enters or leaves pointer lock mode.
63
-
* New: StageScaleMode.forceOrientation allows you to lock your game to one orientation and display a Sprite (i.e. a "please rotate" screen) when incorrect.
64
-
* New: World.visible boolean added, toggles rendering of the world on/off entirely.
65
-
* New: Polygon class & drawPolygon method added to Graphics (thanks rjimenezda)
66
-
* New: Added Group.iterate, a powerful way to count or return children that match a certain criteria. Refactored Group to use iterate, lots of repeated code cut.
67
-
* New: Added Group.sort. You can now sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :) Example created to show.
68
-
* New: Enhanced renderTexture so it can accept a Phaser.Group object and improved documentation and examples.
69
-
* New: Device.littleEndian boolean added. Only safe to use if the browser supports TypedArrays (which IE9 doesn't, but nearly all others do)
70
-
* New: You can now call game.sound.play() and simply pass it a key. The sound will play if the audio system is unlocked and optionally destroy itself on complete.
71
-
* New: Mouse.capture is a boolean. If set to true then DOM mouse events will have event.preventDefault() applied, if false they will propogate fully.
72
-
* New: The object returned by Math.sinCosGenerator now contains a length property.
73
-
74
-
* Updated: Lots of documentation fixes and updates across nearly all files. Tilemap now documented for example and lots of instances of 'Description' filled out.
75
-
* Updated: ArcadePhysics.updateMotion applies the dt to the velocity calculations as well as position now (thanks jcs)
76
-
* Updated: RequestAnimationFrame now retains the callbackID which is passed to cancelRequestAnimationFrame.
77
-
* Updated: Button now goes back to over state when setFrames used in action (thanks beeglebug)
78
-
* Updated: plugins now have a postUpdate callback (thanks cocoademon)
79
-
* Updated: Tided up the Graphics object (thanks BorisKozo)
80
-
* Updated: If running in Canvas mode and you have a render function it will save the context and reset the transform before running your render function.
81
-
* Updated: Sprite will now check the exists property of the Group it is in, if the Group.exists = false the Sprite won't update.
82
-
* Updated: If you specify 'null' as a Group parent it will now revert to using the World as the parent (before only 'undefined' worked)
83
-
* Updated: Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist (thanks cocoademon)
84
-
* Updated: Loader.audio can now accept either an array of URL strings or a single URL string (thanks crazysam + kevinthompson)
85
-
* Updated: MSPointer updated to support IE11 by dropping the prefix from the event listeners.
86
-
* Updated: Device.cocoonJS added to detect if the game is running under Cocoon or a native browser.
87
-
* Updated: Loader now uses a new queue system internally, meaning you can have assets with the same key spread across different types.
88
-
89
-
* Fixed: Lots of fixes to the TypeScript definitions file (many thanks gltovar)
90
-
* Fixed: Tilemap commands use specified layer when one given (thanks Izzimach)
91
-
* Fixed: Mouse.stop now uses the true useCapture, which means the event listeners stop listening correctly (thanks beeglebug)
92
-
* Fixed: Input Keyboard example fix (thanks Atrodilla)
93
-
* Fixed: BitmapText.destroy now checks if it has a canvas before calling parentNode on it.
94
-
* Fixed: Group.swap had a hellish to find bug that only manifested when B-A upward swaps occured. Hours of debugging later = bug crushed.
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.
125
79
126
80
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.
127
81
128
-
Phaser is 281 KB minified and 66 KB gzipped.
82
+
Phaser is 321 KB minified and 72 KB gzipped.
83
+
129
84
130
85
Features
131
86
--------
132
87
133
88
**WebGL & Canvas**
134
89
135
-
Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile. Phaser uses and contributes towards the excellent Pixi.js library for rendering.
90
+
Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile. When running under WebGL Phaser now supports shaders, allowing for some incredible in-game effects. Phaser uses and contributes towards the excellent Pixi.js library for rendering.
136
91
137
92
**Preloader**
138
93
139
-
We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML - all parsed and handled automatically, ready for use in game and stored in a global Cache for Sprites to share.
94
+
We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML and JavaScrtip files - all parsed and handled automatically, ready for use in game and stored in a global Cache for Sprites to share.
140
95
141
96
**Physics**
142
97
@@ -197,6 +152,7 @@ Although Phaser 1.0 is a brand new release it is born from years of experience b
* Create more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/)
228
184
* Look at HiDPI Canvas settings.
229
185
186
+
230
187
Learn By Example
231
188
----------------
232
189
@@ -244,6 +201,7 @@ There is a new 'Side View' example viewer as well. This loads all the examples i
244
201
245
202
You can also browse all [Phaser Examples](http://gametest.mobi/phaser/) online.
246
203
204
+
247
205
Contributing
248
206
------------
249
207
@@ -255,6 +213,7 @@ You can do this on the Phaser board that is part of the [HTML5 Game Devs forum](
255
213
256
214
Before submitting a pull request, please run your code through [JSHint](http://www.jshint.com/) to check for stylistic or formatting errors. To use JSHint, first install it by running `npm install jshint`, then test your code by running `jshint src`. This isn't a requirement, we are happy to receive pull requests that haven't been JSHinted, so don't let it put you off contributing - but do know that we'll reformat your source before going live with it.
257
215
216
+
258
217
Bugs?
259
218
-----
260
219
@@ -264,10 +223,11 @@ Please add them to the [Issue Tracker][1] with as much info as possible, especia
264
223
265
224
"Being negative is not how we make progress" - Larry Page, Google
266
225
226
+
267
227
License
268
228
-------
269
229
270
-
Phaser is released under the (http://opensource.org/licenses/MIT) MIT License.
230
+
Phaser is released under the [MIT License](http://opensource.org/licenses/MIT).
0 commit comments