From a2b03f24a61ba66115bba13598ba501386d839a5 Mon Sep 17 00:00:00 2001 From: "dyddnrdl3@naver.com" <dyddnrdl3@naver.com> Date: Tue, 28 Dec 2021 22:00:37 +0900 Subject: [PATCH] hopefully last commit before submission --- README.md | 6 +++++- README_kr.md | 6 +++++- camera/README.md | 1 - lifecycle/README.md | 6 ++++-- lifecycle/README_kr.md | 4 +++- physics/README.md | 1 - 6 files changed, 17 insertions(+), 7 deletions(-) delete mode 100644 camera/README.md diff --git a/README.md b/README.md index 576fd25..1106ac7 100644 --- a/README.md +++ b/README.md @@ -83,4 +83,8 @@ You can make various kinds of game like 2D-scroll game, puzzle game... etc. For I'd like to talk about some feature, differences and other interesting topics may be helpful for your programming. Belows are my suggest! <br/> [<strong>Phaser Scene cycle</strong>](./lifecycle/README.md)<br/> -[<strong>Phaser Physics: arcade & matter</strong>](./physics/README.md) \ No newline at end of file +[<strong>Phaser Physics: arcade & matter</strong>](./physics/README.md) +<br><br><br> +### Caution +This project is basically based on Phaser 3.24.1<br> +Docs were meant to treat about foundamental part of Phaser 3 which would not change. But if there are huge gap between latest version, please let us know. \ No newline at end of file diff --git a/README_kr.md b/README_kr.md index 6a43c5b..b8566da 100644 --- a/README_kr.md +++ b/README_kr.md @@ -83,4 +83,8 @@ script에 CDN을 추가하거나 NPM을 통해 설치하실 수 있습니다. Phaser 게임 개발에 도움이 될 수 있는 여러 가지 특징, 차이 및 주제에 대해서 얘기하고자 합니다. 아래는 그 내용입니다. <br/> [<strong>Phaser Scene cycle</strong>](./lifecycle/README_kr.md)<br/> -[<strong>Phaser Physics: arcade & matter</strong>](./physics/README_kr.md) \ No newline at end of file +[<strong>Phaser Physics: arcade & matter</strong>](./physics/README_kr.md) +<br><br><br> +### 주의사항 +본 프로젝트는 Phaser 3.24.1를 기반으로 제작하였습니다.<br> +문서들은 변화의 여지가 없을만한 Phaser 3의 기본적인 부분을 다루고자 하였습니다. 하지만 최신 버전과 큰 차이가 있다고 느껴지실 경우, 알려주시면 감사하겠습니다. \ No newline at end of file diff --git a/camera/README.md b/camera/README.md deleted file mode 100644 index 339bfba..0000000 --- a/camera/README.md +++ /dev/null @@ -1 +0,0 @@ -# Phaser 3 Camera diff --git a/lifecycle/README.md b/lifecycle/README.md index 2be6cba..74ffddd 100644 --- a/lifecycle/README.md +++ b/lifecycle/README.md @@ -20,7 +20,7 @@ However, if you just started using phaser, you should know 3 basic Scene functio Usually, you can load images or other resources at **preload** and create Phaser objects at **create** like sprite objects or others. And make your own game logic at **update**(If you are going to make event listner for logic, never write those codes in **update**). But you have to consider that **update** get executed periodically which is related with FPS. --- -## Why we load resources at **preload** and make objects at **create**? +## Why should 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 after **preload** but it is not mandatory nor official. --- @@ -39,7 +39,9 @@ You may want to limi your update rate because of performance issue or other reas </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. But you can't increase it. - +--- +## Isn't there any **finish** in cycle? +Of course, there is state of Phaser Scene in **STOP** state which stands for when Phaser Scene is 'destroyed'(or you may say it as 'finished'). This state can be entered by triggering **destroy** event. However, as you see, there are **preload**, **create** and **update** but not others like **finish** or **destroy** from above. But you can add eventlistner to **destroy** event so you can unleash memories or do other stuffs. <br><br> diff --git a/lifecycle/README_kr.md b/lifecycle/README_kr.md index 6a72067..2ab8c18 100644 --- a/lifecycle/README_kr.md +++ b/lifecycle/README_kr.md @@ -39,7 +39,9 @@ Phaser의 Scene은 크게 다음의 세 가지 상태로 이루어져 있습니 </code></pre> 위의 코드는 **update**가 기존 실행 횟수의 절반으로 실행 횟수를 줄입니다. 예를 들어, 기존의 Phaser 게임에서 **update**를 초당 60회 실행 하였었다면, 위의 코드를 통해 초당 30회로 줄일 수 있습니다. 하지만 이를 증가시킬 수는 없습니다. - +--- +## 순환 주기에서 **종료**는 없나요? +물론, Phaser Scene의 '제거'(혹은 '종료'라고 간주하여도 무방합니다)에 해당하는 상태가 **STOP**의 범주 안에 속해있습니다. 이 상태는 **destroy** 이벤트를 통해서 진입할 수 있습니다. 그러나, 위에서는 보시다시피 **preload**, **created** 그리고 **update**만 있습니다. 하지만, 이벤트 리스너를 통해서 **destory** 이벤트 발생 시 실행될 코드를 작성할 수 있으며, 이때 메모리의 관리를 해주거나 다른 작업을 하실 수 있습니다. <br><br> diff --git a/physics/README.md b/physics/README.md index f7cca6f..591dd75 100644 --- a/physics/README.md +++ b/physics/README.md @@ -15,7 +15,6 @@ From above, you may think 'why should we even consider about **matter** while it **arccade** and **matter** is basically for 2D games. If you check Phaser 3 API docs, you will see that game objects in both physics have function ```setVelocity(x [, y])```. And as you see, there is only x-axis and y-axis which means it really wasn't designed for 3D-game. You can use 3D camera plugin for Phaser 3 but there is high possibility that it doesn't work as you wanted. But, there is awesome extension [**enable3D**](https://github.com/enable3d/enable3d) for making 3D Phaser game - <br><br> --- -- GitLab