Skip to content

Commit 30b1791

Browse files
authored
Merge pull request #749 from phaserjs/release/v2.20.2
Release Phaser CE v2.20.2
2 parents 9e07ba3 + cd7f116 commit 30b1791

File tree

220 files changed

+7753
-7681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+7753
-7681
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log
22

3+
## Version 2.20.2 - 20 February 2025
4+
5+
### Bug Fixes
6+
7+
- Fixed no sound from Web Audio in iOS 17 and 18 after refocusing Safari (#748).
8+
9+
### Thanks
10+
11+
Oussama
12+
313
## Version 2.20.1 - 5 October 2024
414

515
### Updates

README.md

Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
Phaser CE is a fast, free, and fun open source HTML5 game framework. It uses a custom build of [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) for WebGL and Canvas rendering, and supports desktop and mobile web browsers. Games can be compiled to iOS, Android and native desktop apps via 3rd party tools. You can use JavaScript or TypeScript for development.
66

7-
Phaser CE is based on Phaser v2.6.2 by [Photon Storm](http://www.photonstorm.com). [Phaser v3](http://phaser.io/) is the current and fully maintained version.
7+
Phaser CE is based on Phaser v2.6.2 by Photon Storm. [Phaser](http://phaser.io/) is the current and fully maintained version.
88

9-
The [current Phaser CE release is 2.20.1](https://github.com/phaserjs/phaser-ce/releases/tag/v2.20.1).
9+
The [current Phaser CE release is 2.20.2](https://github.com/phaserjs/phaser-ce/releases/tag/v2.20.2).
1010

11-
- **Visit:** The [Phaser website](https://phaser.io) and follow on [Twitter](https://twitter.com/phaser_) (#[phaserjs](https://twitter.com/hashtag/phaserjs))
12-
- **Learn:** [API Docs](https://phaserjs.github.io/phaser-ce/), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
13-
- **Code:** 700+ [Examples](https://samme.github.io/phaser-examples-mirror/ "Phaser CE Examples") ([source][examples]), new [Phaser CE examples](https://codepen.io/collection/AMbZgY/)
14-
- **Read:** Weekly [Phaser World](#newsletter) Newsletter
15-
- **Chat:** [Discord](http://phaser.io/community/discord)
16-
- **Extend:** Phaser plugins - [GitHub](https://github.com/search?q=topic%3Aphaser-plugin&type=Repositories "Phaser plugins on GitHub"), [NPM](https://www.npmjs.com/browse/keyword/phaser-plugin "Phaser plugins on NPM")
11+
- [Phaser CE API Documentation](https://phaserjs.github.io/phaser-ce/)
12+
- [Phaser 2 Examples](https://samme.github.io/phaser-examples-mirror/) ([source code][examples])
13+
- [New Phaser CE examples](https://codepen.io/collection/AMbZgY/)
14+
- [Phaser 2/CE Forum][forum]
15+
- [Phaser on Discord](http://phaser.io/community/discord)
16+
- [Phaser plugins on GitHub](https://github.com/search?q=topic%3Aphaser-plugin&type=Repositories)
17+
- [Phaser plugins on NPM](https://www.npmjs.com/browse/keyword/phaser-plugin)
1718

18-
Grab the source and join in the fun!
19+
If you need API documentation for a [previous version](https://github.com/phaserjs/phaser-ce/releases), download the source code, e.g., <https://github.com/phaserjs/phaser-ce/releases/tag/v2.6.2>, unzip, and open `docs/index.html`.
1920

2021
## Contents
2122

22-
- [Games made with Phaser](#games)
2323
- [Requirements](#requirements)
2424
- [Download Phaser](#download)
2525
- [Getting Started](#getting-started)
@@ -28,14 +28,6 @@ Grab the source and join in the fun!
2828
- [Contributing](#contributing)
2929
- [Change Log](#change-log)
3030

31-
<a name="games"></a>
32-
33-
## Made With Phaser
34-
35-
Thousands of [games](https://phaser.io/news/category/game) have been made in Phaser. From game jam entries, to titles by some of the largest entertainment brands in the world. You can find [hundreds more on our web site](https://phaser.io/games).
36-
37-
We add [new games](https://phaser.io/news/category/game) to the Phaser site weekly, so be sure to send us yours when it's finished!
38-
3931
<a name="requirements"></a>
4032

4133
## Requirements
@@ -80,52 +72,48 @@ Please see additional steps for [Browserify/CommonJS](#browserify) and [Webpack]
8072
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce). Include the following in your html:
8173

8274
```html
83-
<script src="https://cdn.jsdelivr.net/npm/[email protected].1/build/phaser.js"></script>
75+
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/build/phaser.js"></script>
8476
```
8577

8678
or the minified version:
8779

8880
```html
89-
<script src="https://cdn.jsdelivr.net/npm/[email protected].1"></script>
81+
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
9082
```
9183

92-
[Custom builds](https://cdn.jsdelivr.net/npm/[email protected].1/build/custom/) are available too, e.g.,
84+
[Custom builds](https://cdn.jsdelivr.net/npm/[email protected].2/build/custom/) are available too, e.g.,
9385

9486
```html
95-
<script src="https://cdn.jsdelivr.net/npm/[email protected].1/build/custom/phaser-arcade-physics.js"></script>
87+
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/build/custom/phaser-arcade-physics.js"></script>
9688
```
9789

9890
<a name="getting-started"></a>
9991

10092
## Getting Started
10193

102-
Our [Getting Started Guide](https://phaser.io/tutorials/getting-started) will get you up to speed quickly: from [setting up a web server](https://phaser.io/tutorials/getting-started/part2) to picking an editor/IDE. After that read our [Making your first Game](https://phaser.io/tutorials/making-your-first-phaser-2-game/) tutorial. Please work through this, **no matter what your development experience**, to learn how Phaser CE approaches things.
94+
Our [Getting Started Guide](https://phaser.io/tutorials/getting-started-phaser2/) will get you up to speed quickly: from [setting up a web server](https://phaser.io/tutorials/getting-started/part2) to picking an editor/IDE. After that read our [Making your first Game](https://phaser.io/tutorials/making-your-first-phaser-2-game/) tutorial. Please work through this, **no matter what your development experience**, to learn how Phaser CE approaches things.
10395

10496
Using **TypeScript**? See Phaser CE's [TypeScript definitions](https://github.com/photonstorm/phaser-ce/tree/master/typescript) and the [Using Phaser with TypeScript](https://phaser.io/tutorials/how-to-use-phaser-with-typescript).
10597

106-
Prefer **videos**? Zenva have an excellent [Phaser video course](https://academy.zenva.com/product/the-complete-mobile-game-development-course-platinum-edition/?a=13), with hours of great material.
107-
10898
### Source Code Examples
10999

110-
Currently there are over 700 Phaser 2 examples, with the full source code and assets available.
111-
112-
Browse [Phaser Examples Mirror](https://github.com/samme/phaser-examples-mirror) and eat your heart out!
100+
Currently there are over [700 Phaser 2 examples](https://github.com/samme/phaser-examples-mirror), with the full source code and assets available.
113101

114102
### Web Templates
115103

116-
If you'd like to try coding in Phaser CE right now, with nothing more than your web browser, open up the [Phaser CE Game Template](https://codepen.io/pen?template=vyKJvw). There are [CoffeeScript](https://codepen.io/pen?template=OWxELE) and [ES6](https://codepen.io/pen?template=pRGPKG) variants too.
104+
If you'd like to try coding in Phaser CE right now, with nothing more than your web browser, open up the [Phaser CE Game Template](https://codepen.io/pen?template=vyKJvw) or [ES6 Template](https://codepen.io/pen?template=pRGPKG).
117105

118106
### http-server
119107

120108
For most development, you'll need to run a local web server. If you already have [node](https://nodejs.org), it's as easy as:
121109

122-
```bash
110+
```sh
123111
npm install -g http-server
124112
```
125113

126114
Then from your project:
127115

128-
```bash
116+
```sh
129117
http-server . -c-1 -o
130118
```
131119

@@ -195,17 +183,25 @@ Releases of new versions of Phaser CE are under the community's control. If you
195183
- `package.json`
196184
- `src/Phaser.js`
197185

198-
2. Make sure that you have added details of the new version to `CHANGELOG.md`. This should include a summary of changes made in the version. You can usually obtain this from the commit / PR history. It's nice to credit who made the changes by linking to their GitHub user ID, but isn't a requirement.
186+
2. Add details of the new version to `CHANGELOG.md`. This should include a summary of changes made in the version. You can usually obtain this from the commit / PR history. It's nice to credit who made the changes by linking to their GitHub user ID, but isn't a requirement.
199187

200-
3. From the root repo folder, run `grunt eslint` and make sure there are no errors. If there are, please fix them, or request that the original author of the code does so.
188+
3. Update any relevant version numbers in `README.md`.
201189

202-
4. Once ESLint passes run `grunt release`, sit back, and wait. It will build all of the versions of Phaser CE required, update the doc files, TypeScript defs and lots more. When finished, commit all of the new files and make sure to include a clear message in your commit saying you want this release pushed to npm. Be sure to tag me when doing this, i.e. 'Phaser CE Version 2.X.X. Please publish to npm @photonstorm' - I'll see it, and then publish as soon as I can (often the same day).
190+
4. Run `npm run check-version`. Verify all the version numbers match except in `build/phaser.js`, which isn't rebuilt yet.
191+
192+
5. From the root repo folder, run `grunt eslint` and make sure there are no errors. If there are, please fix them, or request that the original author of the code does so.
193+
194+
6. Once ESLint passes run `grunt release`, sit back, and wait. It will build all of the versions of Phaser CE required, update the doc files, TypeScript defs and lots more.
195+
196+
7. Run `npm run check-version` and verify all the version numbers match.
197+
198+
8. When finished, commit all of the new files and include a clear message in your commit saying you want this release pushed to npm: _Phaser CE Version 2.X.X. Please publish to npm @photonstorm_. I'll see it, and then publish as soon as I can (often the same day).
203199

204200
<a name="newsletter"></a>
205201

206202
## Weekly Newsletter
207203

208-
Every Monday we publish the [Phaser World](https://phaser.io/newsletter) newsletter. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, talks, and more. It also contains our weekly Development Progress updates. If you want to know what we're working on, this is the newsletter to read!
204+
Every Monday we publish the [Phaser World](https://phaser.world) newsletter. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, talks, and more. It also contains our weekly Development Progress updates. If you want to know what we're working on, this is the newsletter to read!
209205

210206
<a name="contributing"></a>
211207

@@ -215,7 +211,7 @@ The [Contributors Guide][contribute] contains full details on how to help with P
215211

216212
- Found a bug? Report it on [GitHub Issues][issues] and include a code sample.
217213
- Before submitting a Pull Request run `npm run test` and fix any errors.
218-
- Before contributing read the [code of conduct](https://github.com/photonstorm/phaser-ce/blob/master/CODE_OF_CONDUCT.md).
214+
- Before contributing read the [code of conduct](https://github.com/phaserjs/phaser-ce/blob/master/CODE_OF_CONDUCT.md).
219215

220216
Written something cool in Phaser? Please tell us about it in the [forum][forum], or email [email protected]
221217

@@ -235,27 +231,21 @@ Phaser 2 was originally a [Photon Storm](http://www.photonstorm.com) production,
235231

236232
![storm](https://www.phaser.io/images/github/photonstorm-x2.png)
237233

238-
Created by [Richard Davey](mailto:[email protected]). Powered by coffee, anime, pixels and love.
239-
240-
The Phaser logo and characters are © 2024 Photon Storm Limited.
241-
242-
All rights reserved.
234+
The Phaser logo and characters are © 2024 Photon Storm Limited. All rights reserved.
243235

244236
"Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata
245237

246-
[![Analytics](https://ga-beacon.appspot.com/UA-44006568-2/phaser/index)](https://github.com/igrigorik/ga-beacon)
247-
248-
[get-js]: https://github.com/phaserjs/phaser-ce/releases/download/v2.20.0/phaser.js
249-
[get-minjs]: https://github.com/phaserjs/phaser-ce/releases/download/v2.20.0/phaser.min.js
250-
[get-zip]: https://github.com/phaserjs/phaser-ce/archive/v2.20.0.zip
251-
[get-tgz]: https://github.com/phaserjs/phaser-ce/archive/v2.20.0.tar.gz
252-
[clone-http]: https://github.com/phaserjs/phaser.git
253-
[clone-ssh]: ssh://[email protected]:phaserjs/phaser.git
254-
[clone-svn]: https://github.com/phaserjs/phaser
238+
[get-js]: https://github.com/phaserjs/phaser-ce/releases/download/v2.20.2/phaser.js
239+
[get-minjs]: https://github.com/phaserjs/phaser-ce/releases/download/v2.20.2/phaser.min.js
240+
[get-zip]: https://github.com/phaserjs/phaser-ce/archive/v2.20.2.zip
241+
[get-tgz]: https://github.com/phaserjs/phaser-ce/archive/v2.20.2.tar.gz
242+
[clone-http]: https://github.com/phaserjs/phaser-ce.git
243+
[clone-ssh]: ssh://[email protected]:phaserjs/phaser-ce.git
244+
[clone-svn]: https://github.com/phaserjs/phaser-ce
255245
[clone-ghwin]: github-windows://openRepo/https://github.com/phaserjs/phaser-ce
256246
[clone-ghmac]: github-mac://openRepo/https://github.com/phaserjs/phaser-ce
257247
[phaser]: https://github.com/phaserjs/phaser-ce
258248
[issues]: https://github.com/phaserjs/phaser-ce/issues
259249
[examples]: https://github.com/samme/phaser-examples-mirror
260250
[contribute]: https://github.com/phaserjs/phaser-ce/blob/master/.github/CONTRIBUTING.md
261-
[forum]: https://phaser.discourse.group/
251+
[forum]: https://phaser.discourse.group/c/phaser2/6

build/custom/creature.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/p2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-arcade-physics.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser CE - https://github.com/photonstorm/phaser-ce
99
*
10-
* v2.20.1 "2024-10-05" - Built: Sat Oct 05 2024 11:25:47
10+
* v2.20.2 "2025-02-20" - Built: Thu Feb 20 2025 10:11:52
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
1313
*
@@ -7774,7 +7774,7 @@ var Phaser = Phaser || { // jshint ignore:line
77747774
* @constant Phaser.VERSION
77757775
* @type {string}
77767776
*/
7777-
VERSION: '2.20.1',
7777+
VERSION: '2.20.2',
77787778

77797779
/**
77807780
* AUTO renderer - picks between WebGL or Canvas based on device.
@@ -67573,12 +67573,24 @@ Phaser.SoundManager.prototype = {
6757367573
*/
6757467574
gameResumed: function ()
6757567575
{
67576-
this.resumeWebAudio();
67577-
6757867576
if (this.muteOnPause)
6757967577
{
6758067578
this.unsetMute();
6758167579
}
67580+
67581+
if (this.usingWebAudio && this.context.state !== 'running')
67582+
{
67583+
var _this = this;
67584+
67585+
// Needed to handle resuming audio on iOS17/iOS18+ if you hide the browser, press the home button, etc. <https://github.com/phaserjs/phaser/issues/6829>
67586+
setTimeout(function ()
67587+
{
67588+
if (!_this.context) { return; }
67589+
67590+
_this.context.suspend();
67591+
_this.context.resume();
67592+
}, 100);
67593+
}
6758267594
},
6758367595

6758467596
/**

build/custom/phaser-arcade-physics.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-arcade-physics.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-creature.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser CE - https://github.com/photonstorm/phaser-ce
99
*
10-
* v2.20.1 "2024-10-05" - Built: Sat Oct 05 2024 11:26:10
10+
* v2.20.2 "2025-02-20" - Built: Thu Feb 20 2025 10:12:14
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
1313
*
@@ -40,7 +40,7 @@ var Phaser = Phaser || { // jshint ignore:line
4040
* @constant Phaser.VERSION
4141
* @type {string}
4242
*/
43-
VERSION: '2.20.1',
43+
VERSION: '2.20.2',
4444

4545
/**
4646
* AUTO renderer - picks between WebGL or Canvas based on device.
@@ -59839,12 +59839,24 @@ Phaser.SoundManager.prototype = {
5983959839
*/
5984059840
gameResumed: function ()
5984159841
{
59842-
this.resumeWebAudio();
59843-
5984459842
if (this.muteOnPause)
5984559843
{
5984659844
this.unsetMute();
5984759845
}
59846+
59847+
if (this.usingWebAudio && this.context.state !== 'running')
59848+
{
59849+
var _this = this;
59850+
59851+
// Needed to handle resuming audio on iOS17/iOS18+ if you hide the browser, press the home button, etc. <https://github.com/phaserjs/phaser/issues/6829>
59852+
setTimeout(function ()
59853+
{
59854+
if (!_this.context) { return; }
59855+
59856+
_this.context.suspend();
59857+
_this.context.resume();
59858+
}, 100);
59859+
}
5984859860
},
5984959861

5985059862
/**

build/custom/phaser-creature.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-creature.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)