Repo ↗ · 原始 README ↗ · 文件包(Markdown/授權)

封面參考(原作): Riders Republic · 原作宣傳圖,由 IGDB 提供。圖片版權屬原權利人,供辨識原作使用,不代表此重寫/模組專案的實際畫面。

來源維護者: OpenRsG · 版本: eae1c84c11a8 · 整理日期: 2026-10-12

文件授權: Apache-2.0 · LICENSE · 本文形式: README 翻譯

下文為來源 README 的繁中翻譯,由 Kirikirin 使用 AI 輔助整理;功能、完成度與測試結果均為原作者描述,本站未逐項實機驗證。圖片改為來源連結,指令與技術識別保留原文。


RustRepublic

以 Rust + Bevy 打造的極限登山車與滑雪物理。 後空翻、桶滾、
甩尾、540 抓板、刻滑、V 字滑行、真實摔車化為布娃娃物理。可在
桌面執行,或透過 WebGPU 在瀏覽器中執行。

單車自由式 滑雪自由式
README 圖片:Bike: Superman, backflip, barrel roll, tailwhip README 圖片:Ski: 360 Mute, backflip Safety, 540 Japan, Daffy
Full bike showcase loop: 17 runs, 5 crashes (mp4, 3:39) Full ski showcase loop: 14 runs, 5 crashes (mp4, 3:38)

[!IMPORTANT]
沒有遊戲程式碼,也不需要遊戲。 這個儲存庫中的所有內容都是為
本專案從零撰寫:物理、骨架、動畫、渲染與攝影機。它
不包含來自 Riders Republic 的任何程式碼、素材、模型、動畫或資料,也從不
載入任何遊戲檔案。你不需要擁有或安裝該遊戲就能建置或遊玩。

這是一個受 Riders Republic 啟發的粉絲專案,與
Ubisoft 無隸屬關係,也未獲其背書。部分姿勢、身體比例與時間點是
對照從本機安裝的遊戲其自身影片與動畫檔案所取得的測量值進行調整,
就像動畫師研究參考影片一樣。只有我們自己的數字進入程式碼,絕不使用遊戲資料。

遊玩

cargo run --locked --release

你需要 Rust 1.88+、C 編譯器、Linux X11/Wayland 開發函式庫,以及
Vulkan 驅動程式。按 F6 觀看自動花式展示,按 5 切換到
滑雪,按 1–4 選擇單車。

在瀏覽器中(WebGPU)

scripts/web.sh        # builds target/www (index.html + JS + wasm)

透過 HTTPS 或 localhost 提供 target/www,例如使用 tailscale serve、
python -m http.server 或任何靜態主機,並在最新的 Chrome、Edge 或
Safari 中開啟。你需要 wasm32-unknown-unknown 目標與
wasm-bindgen-cli 0.2.129,版本與 Cargo.lock 中相同。此建置已針對
速度最佳化;當在 PATH 上或 .tools/binaryen/ 下找到 wasm-opt(binaryen)時會執行,
並在 wasm 旁寫出一份 gzip 壓縮副本(約 8.5 MB)。頁面會下載該副本並
在瀏覽器中解壓縮,附有進度列,因此不需要伺服器壓縮。

頁面會直接開啟循環的滑雪展示。右上角的 ☰ 選單可切換
滑雪與四種單車、啟動任一種展示、挑選花式,並切換暫停、
骨骼、網格、按鍵說明、觸控與全螢幕。

  • 觸控(顯示於觸控螢幕):左搖桿騎乘(踩踏/推進、煞車、
    轉向),右搖桿傾斜與翻轉,按鈕則按住跳躍、衝刺/收身、翻轉、
    花式/抓板與兩種旋轉,外加單車的翹前輪與平衡滑行。在展示期間觸碰控制項
    即可接管。重置與攝影機回正位於選單旁。
  • 直向: 視野會變寬而非裁切兩側,且攝影機會向下看,
    讓高螢幕顯示雪地而非天空。
  • HUD: 面板會縮小,按鍵說明會隱藏。
  • 攝影機: 以單指拖曳空白畫面來環繞,捏合來縮放。

內容包含

單車:四種項目(Downhill、Road、Slopestyle、Freeride),各有自己的
避震、動力、抓地力與外觀。

  • 物理: 固定 120 Hz 的雙輪模型,包含踩踏、衝刺、煞車、
    翹前輪與平衡滑行。每個輪胎都有一份由驅動、煞車與
    過彎共用的抓地力額度,因此在彎中重煞會打滑,而前輪打滑半
    秒就會失控。高速時你靠傾斜轉向:把手會先朝另一側下沉
    (逆操舵),接著單車隨傾斜轉向;步行速度時把手則直接
    轉向。用單輪落地後空翻,你必須用
    方向鍵平衡,否則會後翻或前翻過把手。
  • 旋轉: 翻轉、桶滾與旋轉是單車實際的動量。沒有
    預錄的旋轉,所以你可能轉不夠而摔車。騎士以頭、
    肩與臀帶動它們。
  • 花式: 手、腳與單車花式可自由組合,並有左/右變體。
    Superman、can-can、nac-nac、tailwhip、barspin、table、X-up、turndown、Euro table、
    invert、crankflip 等更多。
  • 騎士: 踩踏時有臀部擺動與腳踝動作,並在過彎時傾斜與外展膝蓋。
    衝刺時肩膀拉著把手,將單車左右甩動;極速時騎士會壓低。
    落地時透過手臂與腿吸收。

滑雪:

  • 滑行: 以滑雪板的側切半徑刻滑(半徑 = 側切 × cos 邊緣角,因此更多
    邊緣轉得更緊;超過邊緣抓地力後轉彎會打滑),並有傾角與上下身分離、冰球煞停、
    犁式、收身與反向滑行。
  • 平地: V 字滑行與雙杖推進,節奏與速度增益與每次
    推撐相關。
  • 空中: 跳躍時有預壓下蹲與彈起、自由旋轉與翻轉,以及九種
    抓板(Mute、Safety、Japan、Tail、Tip、Truck Driver、Daffy、Spread Eagle、Iron Cross)。
  • 落地: 寬站姿吸收與短暫打滑。
  • 摔車: 剛體滑雪者具備人體關節活動範圍與自碰撞,可讓
    四肢彼此避開,並讓身體維持在數毫米之內。關節超過
    其強度會斷裂,固定器會釋放,雪杖在高負載下會從拳中扯出,
    HUD 會列出斷裂的項目。

兩者共通:

  • 摔車: 糟糕的落地、猛烈撞擊(進地太快,或又快又
    角度不對)或身體撞擊會將騎士拋入具關節的布娃娃物理,保留
    動量。兩者都是在同一個共用求解器上、具人體關節活動範圍與自碰撞的
    剛體膠囊四肢。單車騎士會抓緊直到摔車的拉扯超過手腳
    所能承受,並在過程中拖曳與推擠單車。
  • 起身: 在展示之外,一旦身體靜止(或 3 秒後),
    騎士會在摔倒處站起,並在 0.7 秒內混合回騎乘姿勢。
    R 仍會返回起點。
  • 音效: 程序生成,無音訊檔案:隨速度變化的風聲、輪胎滾動與打滑、雪地
    刻滑與打滑嘶聲、落地悶響與摔車撞擊。M 靜音。
  • 落地各有不同: 身體會依觸地進來的方向被拋出,並帶有
    每次落地的一點隨機性。
  • 流暢動作: 渲染的姿勢會在物理 tick 之間混合,且每個動畫
    混合都是臨界阻尼彈簧,因此不會有突兀跳動。
  • 攝影機: 追蹤攝影機會跟隨你的行進方向,而非旋轉中的
    身體。其視野會隨速度變寬,並會抬升越過地形而非
    穿入其中。
  • F6 展示(每次循環約 3½ 分鐘):
    • 單車: Superman、backflip、360 X-up、frontflip、backflip Superman、barrel roll、
      no hands + no feet、barspin + tailwhip、table、360 tuck no-hander、frontflip
      can-can、barrel roll no-hander。摔車:nose dive、sideways landing、half barrel、
      over-rotated backflip、incomplete flip。
    • 滑雪: 360 Mute(slalom)、backflip Safety、540 Japan、frontflip Mute、Daffy、
      rodeo Mute(lands switch)、backflip Iron cross、360 Spread eagle(slalom)、switch 180 Tip。
      摔車:sideways 270、under-rotated 720、under-rotated backflip、over-rotated backflip、
      incomplete front flip。
  • 外觀: 每位騎士有一個平滑蒙皮身體,由求解後的骨架驅動(摔車後則由
    布娃娃物理驅動),地形上有程序生成的雪/土顆粒、會在 45 秒內淡出的輪胎與滑雪痕跡、
    SMAA 反鋸齒(桌面版另有環境光遮蔽)
    以及 HUD 中的 fps / 影格時間線。
  • 除錯檢視: F1 骨架疊層、F2 僅骨架。

控制

單車 滑雪
移動 W 踩踏 · S 煞車 · A/D 轉向 · Shift 衝刺 W 滑行/雙杖推進 · S 犁式/冰球煞停 · A/D 刻滑 · Shift 收身
跳躍 Space 跳 · Q 翹前輪 · Z/X 平衡滑行 Space:按住下蹲,放開跳躍
空中 方向鍵翻轉/滾轉 · E/T 旋轉 · Ctrl+方向鍵 強力翻轉/滾轉 方向鍵翻轉/滾轉 · E/T 旋轉 · Ctrl 完整翻轉
花式 U/I/O 選擇手/腳/單車花式 · B 按住 · J/L 側邊 U 選擇抓板 · B 按住 · J/L 側邊
切換 1–4 項目 · 5 滑雪 1–4 回到單車
攝影機 右鍵拖曳環繞 · 滾輪縮放 · C 回正(觸控:拖曳 / 捏合) 相同
其他 F6 展示 · R 重置 · Esc 暫停 · M 音效 · H 說明 · F1/F2 骨架檢視 · F3 記錄狀態 相同

運作方式

檔案 角色
src/bike.rs 單車動力學、避震、接觸、摔車偵測
src/animation.rs, src/scene.rs 騎士動畫層、雙骨 IK 骨架、內插渲染
src/ragdoll.rs, src/rigid.rs 單車騎士布娃娃物理,使用與滑雪布娃娃物理共用的剛體求解器
src/audio.rs 程序生成音效
src/ski/ 滑雪者物理、動畫、骨架、布娃娃物理、渲染、展示
src/game.rs 應用程式設定、輸入、追蹤攝影機、HUD
src/showcase.rs 單車 F6 腳本,透過正常控制驅動

地形是一座白色競技場:解析式高度場,有三個小跳台與一座 32 m
小山,帶有 7 m 起跳坡道通往落地台。使用 cargo test --locked --bins 執行檢查。

限制

  • 動畫是程序生成並在此撰寫。它看起來比以往更接近該遊戲,
    但它不是該遊戲的動畫,也不聲稱與之同等。
  • 碰撞使用代理球體對高度場,而非通用剛體世界。
    騎士沒有自碰撞,因此極端花式可能會穿模。
  • 瀏覽器建置僅支援 WebGPU;沒有 WebGL 後備。

設計筆記、測量與驗證歷史位於
docs/DEVELOPMENT.md。該檔案也記錄了一個選用的
研究工具 rider-assets。它可以檢視本機遊戲安裝的封存索引,但
它與此處的遊戲是分開的,且遊戲從不執行或需要它。

授權

Apache 2.0。


授權與來源聲明

原始 README 與翻譯沿用 Apache-2.0 授權;本次修改為繁中翻譯、連結與排版調整。可修改的 Markdown、原始 README、LICENSE 與 NOTICE 收錄於頂部文件包。原作遊戲內容與商標不因此獲得授權。

LICENSE

Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.