Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Upgrade Docusaurus + Docs rearranging #489

Merged
merged 6 commits into from
May 26, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/gameplay.md → docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: gameplay
title: Gameplay
id: faq
title: FAQ
---

## How do I adjust the speed?
Expand All @@ -15,8 +15,8 @@ As a web-based game, it does not have low-level access to the audio
driver. There are many factors that affect the audio latency in this
game (and web-based audio applications in general):

- The browser's implementation of the Web Audio technology
- Your sound card driver and settings on your operating system
* The browser's implementation of the Web Audio technology
* Your sound card driver and settings on your operating system

Bemuse has a mechanism for delay compensation. Simply open the options
screen and enter your system’s audio+input latency. You can click on the
Expand Down
115 changes: 36 additions & 79 deletions docs/scoring-and-judgment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,95 +3,52 @@ id: scoring-and-judgment
title: Scoring and Judgment
---

The scoring system and judgment system in Bemuse focuses on both
accuracy and combo.
The scoring system and judgment system in Bemuse focuses on both accuracy and combo.

## Judgment

When hitting the note, the accuracy of your button press will be judged
according to this table:
When hitting the note, the accuracy of your button press will be judged according to this table:

| Name | Maximum Offset (ms) | Accuracy Score |
|:--------------:| -------------------:| --------------:|
| METICULOUS! | 20 | 100% |
| PRECISE! | 50 | 80% |
| GOOD! | 100 | 50% |
| OFFBEAT! | 200 | 0% |
| MISSED! | -- | 0% |
| Judgment | Normal | Level5 | Level4 | Level3 | Beginner |
| ---------- | -----: | -----: | -----: | -----: | -------: |
| Meticulous | 20ms | 21ms | 22ms | 23ms | 24ms |
| Precise | 50ms | 60ms | 70ms | 80ms | 100ms |
| Good | 100ms | 120ms | 140ms | 160ms | 180ms |
| Offbeat | 200ms | 200ms | 200ms | 200ms | 200ms |

<div class="srcref admonition">
<p class="first admonition-title">Source code reference</p>
<ul class="last simple">
<li>Defined at <a class="reference external" href="https://github.com/bemusic/bemuse/blob/bf96099/src/game/judgments.js#L7-14">src/game/judgments.js:7-14</a> (judgment timegate)</li>
<li>Defined at <a class="reference external" href="https://github.com/bemusic/bemuse/blob/bf96099/src/game/judgments.js#L51-58">src/game/judgments.js:51-58</a> (judgment weight)</li>
</ul>
</div>
The different timegates are designed to make the game easier for beginners, with a gradual increase in difficulty the harder the song gets. They are divided as follows:

## Scoring
| Timegate | Song Level |
| -------- | ---------: |
| Beginner | 1-2 |
| Level3 | 3 |
| Level4 | 4 |
| Level5 | 5 |
| Normal | 6+ |

The player's score is calculated from this formula:
Based on the above judgement, an accuracy score is given based on the above judgement out of a highest possible score of 555555.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part is inaccurate...


The final score is split into 2 parts:

  • 500000 for accuracy
  • 55555 for combo bonus

Each combo has an associated score.

Combo number Combo score
0 0
1–22 1
23-50 2
51-91 3
92–160 4
161~∞ 5

Combo bonus is the sum of combo score for each hit, divided by maximum possible value, times 55555.

Example: There are 100 notes. 60 notes have been hit, I missed a note, and hit 39 other notes.

  • Obtained combo score = 108 for first 60 notes + 56 for 39 other notes = 164
  • Maximum possible combo score = 237
  • Combo bonus = 164 / 237 * 55555 = 38443


| Judgment | Accuracy Score |
| ---------- | -------------: |
| Meticulous | 100% |
| Precise | 80% |
| Good | 50% |
| Offbeat | 0% |

<div class="math">
\[\begin{split}\text{score} &amp;= 500000 \times \text{accuracy}
+ 55555 \times \text{combo bonus} \\[10pt]
\text{accuracy} &amp;= \frac{
\sum\text{accuracy score}
}{\sum\text{total combos}} \\[10pt]
\text{combo bonus} &amp;= \frac{
\sum_{c \in \text{combos}}{\text{combo level}(c)}
}{\sum_{i = 1}^{\text{total combos}}{\text{combo level}(i)}} \\[10pt]
\text{combo level}(c) &amp;= \begin{cases}
0 &amp; c = 0 \\
1 &amp; 1 \leq c \leq 22 \\
2 &amp; 23 \leq c \leq 50 \\
3 &amp; 51 \leq c \leq 91 \\
4 &amp; 92 \leq c \leq 160 \\
6 &amp; 161 \leq c
\end{cases}\end{split}\]
</div>


Here's how the combo level formula comes from. Let's assume, for
simplicity, a player with 99% hit rate, regardless of difficulty. The
probability that the player will attain \\(c\\) combos is \\(0.99^c\\).

Now we have 6 combo levels. The probability that the player will attain
that level gradually decreases. Therefore, the minimum combo is
\\(\left\lceil\log_{0.99} p\right\rceil\\).

| Combo Level | Max. Probability | Min. Combo |
| -----------:| ----------------:| -----------:|
| 1 | 100% | 1 |
| 2 | 80% | 23 |
| 3 | 60% | 51 |
| 4 | 40% | 92 |
| 5 | 20% | 161 |

<div class="srcref outdated admonition">
<p class="first admonition-title">Source code reference</p>
<ul class="last simple">
<li class="outdated">Defined at <a class="reference external" href="https://github.com/bemusic/bemuse/blob/bf96099/src/game/state/player-stats.js#L27-29">src/game/state/player-stats.js:27-29</a> (score) [outdated: 17be8477]</li>
<li>Defined at <a class="reference external" href="https://github.com/bemusic/bemuse/blob/bf96099/src/game/state/player-stats.js#L99-106">src/game/state/player-stats.js:99-106</a> (combo)</li>
</ul>
</div>

# Grading
## Grading

After playing the game, the grade is calculated according to this table:

| Grade | Minimum Score |
| ----- | -------------:|
| F | 0 |
| D | 300000 |
| C | 350000 |
| B | 400000 |
| A | 450000 |
| S | 500000 |

<div class="srcref admonition">
<p class="first admonition-title">Source code reference</p>
<ul class="last simple">
<li>Defined at <a class="reference external" href="https://github.com/bemusic/bemuse/blob/bf96099/src/rules/grade.js#L2-12">src/rules/grade.js:2-12</a> (grade)</li>
</ul>
</div>
| ----- | ------------: |
| F | 0 |
| D | 300000 |
| C | 350000 |
| B | 400000 |
| A | 450000 |
| S | 500000 |

## References

* The original [pull request](https://github.com/bemusic/bemuse/pull/446) implementing the scoring system.
* [Essay by @dtinth](https://qiita.com/dtinth/items/5b9f6b876a0a777eec50) regarding the new timegates & scoring.
3 changes: 2 additions & 1 deletion website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"BMS Support": "BMS Support",
"colors": "Colors",
"developer-guide": "Developer Guide",
"faq": "FAQ",
"game-loop": "The Game Loop",
"gameplay": "Gameplay",
"music-server": "How to Host a Music Server",
"Music Server": "Music Server",
"options": "Game Options and Configuration",
Expand All @@ -28,6 +28,7 @@
"Discord": "Discord",
"GitHub": "GitHub",
"Users": "Users",
"Creators": "Creators",
"Developers": "Developers"
},
"pages-strings": {
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"rename-version": "docusaurus-rename-version"
},
"devDependencies": {
"docusaurus": "^1.0.15"
"docusaurus": "^1.1.1"
}
}
17 changes: 11 additions & 6 deletions website/pages/en/contribute.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable no-unused-vars */

/**
* Copyright (c) 2017-present, Facebook, Inc.
*
Expand All @@ -18,7 +20,7 @@ function docUrl (doc, language) {
return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc
}

function pageUrl (page, language) { // eslint-disable-line
function pageUrl (page, language) {
return siteConfig.baseUrl + (language ? language + '/' : '') + page
}

Expand All @@ -27,23 +29,26 @@ Bemuse is a free and open-source game, licensed under AGPLv3. It is developed by
[many contributors](https://github.com/bemusic/bemuse/graphs/contributors) in their spare time,
and your contribution helps us deliver new features and bug fixes quickly.

Contributions are always welcome! Thank you for helping us make this game better!
Thank you for helping us make this game better!
`

class Help extends React.Component {
render () {
const supportLinks = [
{
content:
`Follow the [developer documentation](${docUrl('developer-guide.html')}) to get started. Don't forget to read our [coding guidelines](https://github.com/bemusic/bemuse/blob/master/CONTRIBUTING.md) as well.`,
content: `Follow the [developer documentation](${docUrl(
'developer-guide.html'
)}) to get started. Don't forget to read our [coding guidelines](https://github.com/bemusic/bemuse/blob/master/CONTRIBUTING.md) as well.`,
title: 'Read the docs'
},
{
content: 'Read through our [issues thread](https://github.com/bemusic/bemuse/issues) and pick an issue. If you\'re confused, we recommend starting out with [these issues](https://github.com/bemusic/bemuse/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).',
content:
"Read through our [issues thread](https://github.com/bemusic/bemuse/issues) and pick an issue. If you're confused, we recommend starting out with [these issues](https://github.com/bemusic/bemuse/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).",
title: 'Pick an issue'
},
{
content: "We have a [Waffle board](https://waffle.io/bemusic/bemuse) which we use to track this project's development progress.",
content:
"We have a [Waffle board](https://waffle.io/bemusic/bemuse) which we use to track this project's development progress.",
title: 'Track progress'
}
]
Expand Down
3 changes: 2 additions & 1 deletion website/pages/en/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
'use strict'

const React = require('react')
Expand Down Expand Up @@ -206,7 +207,7 @@ const FeatureTour = props => (
image={
<BrowserScreenshot
alt='Screenshot'
src={imgUrl('screenshots/music-select.jpg')}
src={imgUrl('screenshots/music-server.png')}
/>
}
imageAlign='left'
Expand Down
10 changes: 2 additions & 8 deletions website/sidebars.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
"docs": {
"Users": [
"user-guide",
"gameplay",
"scoring-and-judgment",
"music-server",
"bms-support",
"bms-extensions"
],
"Users": ["user-guide", "scoring-and-judgment", "faq"],
"Creators": ["music-server", "bms-support", "bms-extensions"],
"Developers": [
"developer-guide",
"architecture",
Expand Down
Binary file added website/static/img/screenshots/music-server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading