exch-bms2 / beatoraja

Cross-platform rhythm game based on Java and libGDX.
GNU General Public License v3.0
642 stars 148 forks source link

Add RandomCourse #673

Closed Shimi9999 closed 2 years ago

Shimi9999 commented 2 years ago

概要

ランダムコースを実装しました。ステージの曲を指定した検索条件でランダムに決定するコースです。 動作としてはLR2のRANDOM MIX(NONSTOPなし)のイメージです。RANDOM MIXと違い、ステージ毎に曲の検索条件を設定できます。 コース定義はカスタムフォルダ(folder/default.json)に記述し、曲の検索条件もカスタムフォルダと同様の形式のsqlで書きます。

記述例

folder/default.json

{
  "name":"Folder Name",
  "rcourse":[
    {
      "name": "RandomCourse Name",
      "stage": [
        {
          "title": "Stage 1",
          "sql": "sql": "song.mode = 7 AND level = 9"
        },
        {
          "title": "Stage 2",
          "sql": "sql": "song.mode = 7 AND level = 10"
        },
        {
          "title": "Stage 3",
          "sql": "sql": "song.mode = 7 AND level = 11"
        },
        {
          "title": "Stage 4",
          "sql": "sql": "song.mode = 7 AND level = 12"
        },
      ],
      "constraint": [
        "MIRROR",
        "GAUGE_LR2",
      ],
      "rconstraint": [
        "DISTINCT",
      ],
      "trophy": [
        {
          "name": "bronzemedal",
          "missrate": 7.5,
          "scorerate": 55
        },
        {
          "name": "silvermedal",
          "missrate": 5,
          "scorerate": 70
        },
        {
          "name": "goldmedal",
          "missrate": 2.5,
          "scorerate": 85
        }
      ]
    },
    {
      "name": "All Stage Random",
      "stage": [
        {},
        {},
        {},
        {}
      ],
      "constraint": [
        "MIRROR",
        "GAUGE_LR2",
      ],
    },
    {
      "name": "soflan 7keys",
      "stage": [
        {"sql": "song.mode = 7 AND song.maxbpm != song.minbpm"},
        {},
        {},
        {}
      ],
      "constraint": [
        "MIRROR",
        "GAUGE_LR2",
      ],
      "rconstraint": [
        "DISTINCT",
      ],
    }
  ]
}

フォーマット

ランダムコースはカスタムフォルダのフォルダの中に記述する。キー名はrcourse

rcourse

stage

rconstraint

その他の仕様・実装

その他の変更

懸念事項

nocirz commented 2 years ago

Introducing difficulty tables would be better. Using the level data from bms files is not very accurate and it will affect the playing experience.

Shimi9999 commented 2 years ago

Introducing difficulty tables would be better.

I have the same opinion. It should be implemented as a different task from this PR. To implement it, it would be better to create a db table for the difficulty table data or to embed the difficulty table data in the tags of the song records.