mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 04:33:31 +00:00
Fix and improve README's clarity
- Address punctuation, grammar, and typo errors - Improve the clarity of various sections
This commit is contained in:
parent
1f8d0c80f9
commit
0542a78766
1 changed files with 21 additions and 21 deletions
42
README.md
42
README.md
|
@ -2,13 +2,13 @@
|
|||
|
||||
![Phaser Header](https://phaser.io/images/github/300/phaser-header.png "Phaser 3 Header Banner")
|
||||
|
||||
Phaser is a fast, free, and fun open source HTML5 game framework. It offers WebGL and Canvas rendering across desktop and mobile web browsers. Games can be compiled to iOS, Android and native apps via 3rd party tools. You can use JavaScript or TypeScript for development.
|
||||
Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop and mobile web browsers. Games can be compiled to iOS, Android and native apps by using 3rd party tools. You can use JavaScript or TypeScript for development.
|
||||
|
||||
Phaser is available in two versions: Phaser 3 and [Phaser CE - The Community Edition](https://github.com/photonstorm/phaser-ce). Phaser CE is a community-lead continuation of the Phaser 2 codebase and is hosted on its own repo. Phaser 3 is the next generation of Phaser.
|
||||
Phaser is available in two versions: Phaser 3 and [Phaser CE - The Community Edition](https://github.com/photonstorm/phaser-ce). Phaser CE is a community-lead continuation of the Phaser 2 codebase and is hosted on a separate repo. Phaser 3 is the next generation of Phaser.
|
||||
|
||||
Along with the fantastic open source community, Phaser is actively developed and maintained by [Photon Storm](http://www.photonstorm.com). As a result of rapid support, and a developer friendly API, Phaser is currently one of the [most starred](https://github.com/collections/javascript-game-engines) game frameworks on GitHub.
|
||||
|
||||
Thousands of developers worldwide use Phaser. From indies and multi-national digital agencies, to schools and Universities. Each creating their own incredible [games](https://phaser.io/games/).
|
||||
Thousands of developers from indie and multi-national digital agencies, and universities worldwide use Phaser. You can take a look at their incredible [games](https://phaser.io/games/).
|
||||
|
||||
**Visit:** The [Phaser website](https://phaser.io) and follow on [Twitter](https://twitter.com/phaser_) (#phaserjs)<br />
|
||||
**Learn:** [API Docs](https://github.com/photonstorm/phaser3-docs), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)<br />
|
||||
|
@ -18,7 +18,7 @@ Thousands of developers worldwide use Phaser. From indies and multi-national dig
|
|||
**Extend:** With [Phaser Plugins](https://phaser.io/shop/plugins)<br />
|
||||
**Be awesome:** [Support](#support) the future of Phaser<br />
|
||||
|
||||
Grab the source and join in the fun!
|
||||
Grab the source and join the fun!
|
||||
|
||||
![What's New](https://phaser.io/images/github/div-whats-new.png "What's New")
|
||||
|
||||
|
@ -68,9 +68,9 @@ Extra special thanks to our top-tier sponsors: [Orange Games](http://orangegames
|
|||
|
||||
<div align="center"><img src="https://phaser.io/images/github/phaser-world.png"></div>
|
||||
|
||||
Every Monday we publish the [Phaser World](https://phaser.io/community/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, where you can read about what new features we've been working on.
|
||||
Every Monday we publish the [Phaser World](https://phaser.io/community/newsletter) newsletter. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, talks, and more. The newsletter also contains our weekly Development Progress updates which let you know about the new features we're working on.
|
||||
|
||||
Over 100 previous editions can found on our [Back Issues](http://phaser.io/community/backissues) page.
|
||||
Over 100 previous editions can be found on our [Back Issues](http://phaser.io/community/backissues) page.
|
||||
|
||||
![Download Phaser](https://phaser.io/images/github/div-download.png "Download Phaser")
|
||||
<a name="download"></a>
|
||||
|
@ -91,7 +91,7 @@ npm install phaser
|
|||
|
||||
### CDN
|
||||
|
||||
[Phaser is on jsDelivr](http://www.jsdelivr.com/projects/phaser), a "super-fast CDN for developers". Include the following in your html:
|
||||
[Phaser is on jsDelivr](http://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html:
|
||||
|
||||
```html
|
||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.1.2/dist/phaser.js"></script>
|
||||
|
@ -112,7 +112,7 @@ Phaser is released under the [MIT License](https://opensource.org/licenses/MIT).
|
|||
|
||||
<img src="https://phaser.io/images/github/learn.jpg" align="right">
|
||||
|
||||
Phaser 3 is so brand new the paint is still wet, but tutorials and guides are starting to come out!
|
||||
Phaser 3 is so brand new the "paint is still wet", but tutorials and guides are starting to come out!
|
||||
|
||||
* [Getting Started with Phaser 3](https://phaser.io/tutorials/getting-started-phaser3) (useful if you are completely new to Phaser)
|
||||
* [Making your first Phaser 3 Game](https://phaser.io/tutorials/making-your-first-phaser-3-game)
|
||||
|
@ -122,7 +122,7 @@ Also, please subscribe to the [Phaser World](https://phaser.io/community/newslet
|
|||
|
||||
### Source Code Examples
|
||||
|
||||
During our development of Phaser 3 we created hundreds of examples, with the full source code and assets available. Until those are fully integrated with the Phaser web site, you'll have to browse them in the [Phaser 3 Labs](http://labs.phaser.io), or clone the [examples repo][examples]. Note: Not all examples work, sorry! We're tidying them up as fast as we can.
|
||||
During our development of Phaser 3 we created hundreds of examples using the full source code and assets. Until these examples are fully integrated into the Phaser website, you can browse them on [Phaser 3 Labs](http://labs.phaser.io), or clone the [examples repo][examples]. Note: Not all examples work, sorry! We're tidying them up as fast as we can.
|
||||
|
||||
### Create Your First Phaser 3 Example
|
||||
|
||||
|
@ -142,7 +142,7 @@ Create an `index.html` page locally and paste the following code into it:
|
|||
</html>
|
||||
```
|
||||
|
||||
This is a standard empty web page. You'll notice it's pulling in a build of Phaser 3 in the script tag, but otherwise doesn't do anything yet. Now let's set-up the game config. Paste the following between the `<script></script>` tags:
|
||||
This is a standard empty webpage. You'll notice there's a script tag that is pulling in a build of Phaser 3, but otherwise this webpage doesn't do anything yet. Now let's set-up the game config. Paste the following between the `<script></script>` tags:
|
||||
|
||||
```javascript
|
||||
var config = {
|
||||
|
@ -162,7 +162,7 @@ var config = {
|
|||
};
|
||||
```
|
||||
|
||||
This is a pretty standard Phaser 3 Game Configuration object. We'll tell it to use the WebGL renderer if it can, set the canvas to a size of 800x600 pixels, enable Arcade Physics and finally call the `preload` and `create` functions. These don't exist yet, so if you run this it will just error. So add the following after the config object:
|
||||
`config` is a pretty standard Phaser 3 Game Configuration object. We tell `config` to use the WebGL renderer if it can, set the canvas to a size of 800x600 pixels, enable Arcade Physics, and finally call the `preload` and `create` functions. `preload` and `create` have not been implemented yet, so if you run this JavaScript code, you will have an error. Add the following after `config`:
|
||||
|
||||
```javascript
|
||||
var game = new Phaser.Game(config);
|
||||
|
@ -181,9 +181,9 @@ function create ()
|
|||
}
|
||||
```
|
||||
|
||||
This creates a Phaser Game instance, using our configuration object. It also provides the two functions it needs. The `preload` function is a way to easily load assets into your game. Here we'll set the Base URL to be the Phaser server and grab down 3 PNG files.
|
||||
`game` is a Phaser Game instance that uses our configuration object `config`. We also add function definitions for `preload` and `create`. The `preload` function helps you easily load assets into your game. In `preload`, we set the Base URL to be the Phaser server and load 3 PNG files.
|
||||
|
||||
The create function is empty, so it's time to fill it in:
|
||||
The `create` function is empty, so it's time to fill it in:
|
||||
|
||||
```javascript
|
||||
function create ()
|
||||
|
@ -208,9 +208,9 @@ function create ()
|
|||
}
|
||||
```
|
||||
|
||||
Here we're adding the sky image into the game. Over the top of this we have created a Particle Emitter. The `scale` value means the particles will start large and then scale away to nothing over the duration of their lifespan.
|
||||
Here we add a sky image into the game and create a Particle Emitter. The `scale` value means that the particles will initially be large and will shrink to nothing as their lifespan progresses.
|
||||
|
||||
Then we add the logo image. Notice how this is a Physics Image, which means it is given a physics body by default. We set some properties on it: velocity, bounce (or restitution) and collision with the world bounds. This will make our logo bounce around the screen. Finally, we tell the particle emitter to follow the logo - so as it moves, the particles will flow from it.
|
||||
After creating the `emitter`, we add a logo image called `logo`. Since `logo` is a Physics Image, `logo` is given a physics body by default. We set some properties for `logo`: velocity, bounce (or restitution), and collision with the world bounds. These properties will make our logo bounce around the screen. Finally, we tell the particle emitter to follow the logo - so as the logo moves, the particles will flow from it.
|
||||
|
||||
Run it in your browser and you'll see the following:
|
||||
|
||||
|
@ -218,23 +218,23 @@ Run it in your browser and you'll see the following:
|
|||
|
||||
(Got an error? Here's the [full code](https://gist.github.com/photonstorm/46cb8fb4b19fc7717dcad514cdcec064))
|
||||
|
||||
It's just a tiny example, and we've hundreds more for you to explore, but hopefully it shows how expressive and quick Phaser is to use. With just a few easily readable lines of code we've got something pretty impressive up on screen!
|
||||
This is a tiny example, and there are hundreds more for you to explore, but hopefully it shows how expressive and quick Phaser is to use. With just a few easily readable lines of code, we've got something pretty impressive up on screen!
|
||||
|
||||
Subscribe to our weekly newsletter for further tutorials and examples.
|
||||
|
||||
![Building Phaser](https://phaser.io/images/github/div-building-phaser.png "Building Phaser")
|
||||
|
||||
Phaser is provided ready compiled in the `dist` folder of the repository. There are both plain and minified versions. The plain version is for use during development, and the minified version for production. You can also create your own builds.
|
||||
There are both plain and minified compiled versions of Phaser in the `dist` folder of the repository. The plain version is for use during development, and the minified version is for production use. You can also create your own builds.
|
||||
|
||||
### Custom Builds
|
||||
|
||||
Phaser 3 has to be built using Webpack. We take advantage of a number of Webpack features and plugins to allow us to properly tailor the build process. You can also elect exactly which features are bundled into your version of Phaser. We will release a tutorial covering the process shortly, but for now please look at our webpack config files to get an idea of the settings required.
|
||||
Phaser 3 must be built using Webpack. We take advantage of a number of Webpack features and plugins which allow us to properly tailor the build process. You can elect exactly which features are bundled into your version of Phaser. We will release a tutorial covering the process shortly, but for now please look at our webpack config files to get an idea of the required settings.
|
||||
|
||||
### Building from source
|
||||
### Building from Source
|
||||
|
||||
Should you wish to build Phaser 3 from source ensure you have the required packages by cloning the repository and then running `npm install`.
|
||||
If you wish to build Phaser 3 from source, ensure you have the required packages by cloning the repository and then running `npm install`.
|
||||
|
||||
You can then run `webpack` to perform a dev build to the `build` folder, including source maps for local testing, or run `npm run dist` to create a minified packaged build into the `dist` folder.
|
||||
You can then run `webpack` to create a development build in the `build` folder which includes source maps for local testing. You can also run `npm run dist` to create a minified packaged build in the `dist` folder.
|
||||
|
||||
![Change Log](https://phaser.io/images/github/div-change-log.png "Change Log")
|
||||
<a name="changelog"></a>
|
||||
|
|
Loading…
Reference in a new issue