Skip to content
Snippets Groups Projects
Commit 6dcc4690 authored by dyddnrdl3@naver.com's avatar dyddnrdl3@naver.com
Browse files

proto for en

parent 2cf8ca13
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,11 @@ However, if you want to make game in modile environment not using mobile web bro
<strong>Phaser API docs</strong>: https://photonstorm.github.io/phaser3-docs/index.html <br/>
<strong>Phaser Examples</strong>: https://phaser.io/examples <br/>
<br/>
# Why Phaser?
You many wonder why i talk about **Phaser** instead of **Unity** or other game engines. Here are some reasons why people use Phaser.<br>
* Using Phaser, you can make single game working on both Desktop and Mobile easily<br/>
* This is Open Source Framework so you can use it freely and contribute to **[Phaser GitHub](https://github.com/photonstorm/phaser)** to improve it
* Unless you use third party app or other frameworks, only you need to run Phaser game is web browser like chrome or safariw
# How to prepare for using Phaser?
## Before prepare for phaser
Before prepare for using Phaser, you may need local webserver to run Phaser game because of security issue or CORS problem. In that case, prepare your favorite local webserver environment.
......
......@@ -23,3 +23,18 @@ Usually, you can load images or other resources at **preload** and create Phaser
## Why we load resources at **preload** and make objects at **create**?
You may wonder why i suggest you to load resources at **preload** and create objects at **create**. Well, if you try you may see that some objects not being created well especially image related objects. This is because Phaser is based on JavaScript which makes loading resources asynchronously. Thus, to avoid such problem, i recommend you to load resources at preload and create phaser object at **create** but it is not mandatory nor official.
---
## How can i change update rate?
You may want to limi your update rate because of performance issue or other reason. And you can limit them since start by setting **config** for physics or using **physics.world.setFPS()** but it sometimes doesn't work depends on your Phaser version. Then, how should you do to do so? You can limit update rate by skipping some of update execution. Below is example
<pre><code>
function update(){
this.c += 1;
if(this.c > 1){
this.c = 0;
return;
}
...
}
</code></pre>
Above code would let Phaser run **update** as half of default rate whcih means, if your Phaser game execute **update** 60 times a second, then above code block will make it 30 time a second.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment