mirror of https://github.com/01-edu/public.git
9 changed files with 233 additions and 144 deletions
@ -0,0 +1,80 @@
|
||||
## scoreboard |
||||
|
||||
### Objectives |
||||
|
||||
You must follow the same [principles](https://public.01-edu.org/subjects/make-your-game/README.md) as the first subject. |
||||
|
||||
For this project you must take into account: |
||||
|
||||
- The usage of **scoreboards** |
||||
- Creation of a **go API service** to save the data from the game into a JSON file |
||||
- The API should accept POST and GET request from the client side, this being the scoreboard data |
||||
|
||||
### Instructions |
||||
|
||||
Just like the first subject you must respect performance. |
||||
|
||||
In order to tell apart every score it should be requested a name when the player ends the game. |
||||
|
||||
After every game, either you win or lose, a scoreboard should be shown with the five highest scores of every game made. |
||||
The scoreboard must display the **position**, **Name**, **score**, **time** in minutes and paginate the results with the rest of the scores. You should give to the client the percentage and the position in the scoreboard |
||||
|
||||
For example: |
||||
|
||||
```console |
||||
Congrats O.J, you are in the top 6%, in the 2nd position. |
||||
|
||||
Rank| Name | Score | time |
||||
--------------------------- |
||||
1st | Kave | 233254 | 12:01 |
||||
2nd | A.J. | 222555 | 03:00 |
||||
3rd | O.J. | 14356 | 05:40 |
||||
4th | -.- | 13663 | 02:34 |
||||
5th | iris | 2354 | 00:40 |
||||
|
||||
<- Page 1/50 -> |
||||
``` |
||||
|
||||
The scoreboard should be ordered by descending order, so the player with the most points should appear on first place. |
||||
|
||||
You will have to create a **go API service**, where you can load the data (POST), and request it (GET). This service will store the information of each play (name, score and time) in a JSON file and returns all the information when requested. |
||||
The JSON file can be organized as you wish. |
||||
|
||||
Here is an example: |
||||
|
||||
```json |
||||
[ |
||||
{ |
||||
"name": "O.j.", |
||||
"Rank": 3, |
||||
"Score": 14356, |
||||
"time": "05:40" |
||||
}, |
||||
{ |
||||
"name": "Kave", |
||||
"Rank": 1, |
||||
"Score": 233254, |
||||
"time": "12:01" |
||||
}, |
||||
.... |
||||
] |
||||
``` |
||||
|
||||
This project will help you learn about: |
||||
|
||||
- [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) |
||||
- [Event loop](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/EventLoop) |
||||
- FPS |
||||
- DOM |
||||
- [Jank/stutter animation](https://murtada.nl/blog/going-jank-free-achieving-60-fps-smooth-websites) |
||||
- [Transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform)/ [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity) |
||||
- JSON |
||||
- Tasks |
||||
- JavaScript |
||||
- Styles |
||||
- Layout |
||||
- Painting |
||||
- Compositing |
||||
- Developer Tools |
||||
- [Firefox](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools) |
||||
- [Chrome](https://developers.google.com/web/tools/chrome-devtools) |
@ -0,0 +1,47 @@
|
||||
#### Functional |
||||
|
||||
##### Play and finish the game |
||||
|
||||
###### Does the scoreboard appear? |
||||
|
||||
##### Play and finish the game |
||||
|
||||
###### Does it asks for a name? |
||||
|
||||
##### Try making a GET request to the GO server API |
||||
|
||||
###### Does the request present the right information? |
||||
|
||||
##### Try making a POST request to the GO server API, then make a GET request to see if the information posted is correct |
||||
|
||||
###### Is it correct? |
||||
|
||||
###### Does the scoreboard have the properties position, Name and score? |
||||
|
||||
###### Is the scoreboard in descending scores order? |
||||
|
||||
###### Does the scoreboard have pagination? |
||||
|
||||
##### Try to see the next page |
||||
|
||||
###### Does it display the next page of scores? |
||||
|
||||
##### Play and finish the game, then search for your name |
||||
|
||||
###### Does the scoreboard present your name and all the right information? |
||||
|
||||
##### Try using the Dev Tool/Performance |
||||
|
||||
###### Does it not present frame drop? |
||||
|
||||
##### Try using the Dev Tool/Performance |
||||
|
||||
###### Does the game run at or around 60fps |
||||
|
||||
#### Bonus |
||||
|
||||
###### +Does the project runs quickly and effectively? (Favoring recursive, no unnecessary data requests, etc) |
||||
|
||||
###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices/README.md)? |
||||
|
||||
###### +Is the code using synchronicity to increase performance? |
@ -1,37 +0,0 @@
|
||||
## score-board |
||||
|
||||
### Objectives |
||||
|
||||
You must follow the same [principles](https://public.01-edu.org/subjects/make-your-game/README.md) as the first subject. |
||||
|
||||
For this project you must take into account the usage of score boards. |
||||
|
||||
The score board must present the following tasks: |
||||
|
||||
- **Countdown clock**: That will indicate the amount of time the player has until the game ends |
||||
- **Score**: That will keep a score count of the amount of XP/points that the player got while playing |
||||
- **Lives**: That indicates the amount of lives that the player has left |
||||
|
||||
### Instructions |
||||
|
||||
Just like the first subject you must respect performance. |
||||
|
||||
All of this tasks can cause some issues with performance if not done properly, causing repainting. The better way to avoid it is by using opacity. |
||||
|
||||
This project will help you learn about: |
||||
|
||||
- [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) |
||||
- [Event loop](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/EventLoop) |
||||
- FPS |
||||
- DOM |
||||
- [Jank/stutter animation](https://murtada.nl/blog/going-jank-free-achieving-60-fps-smooth-websites) |
||||
- [Transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform)/ [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity) |
||||
- Tasks |
||||
- JavaScript |
||||
- Styles |
||||
- Layout |
||||
- Painting |
||||
- Compositing |
||||
- Developer Tools |
||||
- [Firefox](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools) |
||||
- [Chrome](https://developers.google.com/web/tools/chrome-devtools) |
@ -1,55 +0,0 @@
|
||||
#### Functional |
||||
|
||||
###### Does animation run using `RequestAnimationFrame`? |
||||
|
||||
###### Does the game avoid the use of frameworks? |
||||
|
||||
##### Try playing the game |
||||
|
||||
###### Does the game runs without crashing? |
||||
|
||||
##### Try playing the game |
||||
|
||||
###### Does the countdown clock seem to be working? |
||||
|
||||
##### Try playing the game |
||||
|
||||
###### Does the countdown clock reaches the end? |
||||
|
||||
##### Try playing the game allowing the countdown clock to reach the end |
||||
|
||||
###### Does the game end? |
||||
|
||||
##### Try playing the game and score some points |
||||
|
||||
###### Does the score seems to work like it should, by increasing at a certain action done by the player? |
||||
|
||||
##### Try playing the game and try losing a life |
||||
|
||||
###### Does the player lives seem to work like it should, by decreasing the numbers of lives of the player? |
||||
|
||||
##### Try using the Dev Tool/Performance |
||||
|
||||
###### Does it not present frame drop? |
||||
|
||||
##### Try using the Dev Tool/Performance |
||||
|
||||
###### Does the game run at or around 60fps |
||||
|
||||
##### Try using the Dev Tool/performance and the option rendering with the paint ON, if possible |
||||
|
||||
###### Is the paint being used as less as possible? |
||||
|
||||
##### Try using the Dev Tool/performance and the option rendering with the layer ON, if possible |
||||
|
||||
###### Is the layers being used as less as possible? |
||||
|
||||
###### Are the creation of the [layers being promoted](https://developers.google.com/web/fundamentals/performance/rendering/stick-to-compositor-only-properties-and-manage-layer-count) properly? |
||||
|
||||
#### Bonus |
||||
|
||||
###### +Does the project runs quickly and effectively? (Favoring recursive, no unnecessary data requests, etc) |
||||
|
||||
###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices/README.md)? |
||||
|
||||
###### +Is the code using synchronicity to increase performance? |
Loading…
Reference in new issue