Add interactive new-player tutorial (static, at /tutorial) - #54
Add interactive new-player tutorial (static, at /tutorial)#54whitecouncil-alt wants to merge 3 commits into
Conversation
A self-contained walkthrough of a new player's first hour (character creation, movement, the map/description panels, staying alive), with a cinematic MUME logo intro. Served statically from docs/public/tutorial/ at /tutorial — no backend. Content is baked in; the in-browser editor is hidden for the static build. Intended as the destination for the Play page's 'first time' path (see the Play chooser PR). Easily replaced later.
Reviewer's GuideAdds a static Flow diagram for the tutorial lesson engineflowchart TD
A[Load /tutorial] --> B[boot]
B --> C{Published content available?}
C -->|Yes| D[Use fetched lessons]
C -->|No| E[Use local draft or DEFAULT]
D --> F[restart]
E --> F
F --> G[showLesson]
G --> H{Lesson has practice command?}
H -->|No| I[Advance on Enter]
H -->|Yes| J[Validate typed command]
J -->|Incorrect| K[Show hint]
K --> J
J -->|Correct| L{Example response exists?}
L -->|Yes| M[Show example and await Enter]
M --> I
L -->|No| I
I --> N{More lessons?}
N -->|Yes| G
N -->|No| O[showEnd]
O --> P[Character creation handover]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/public/tutorial/index.html" line_range="154" />
<code_context>
+ }
+
+ /* ===================== cinematic layer (preview only) ===================== */
+ @font-face{font-family:'Kelt';src:url('fonts/kelt.woff2') format('woff2');font-weight:400;font-display:swap}
+ @font-face{font-family:'Kelt';src:url('fonts/kelt-bold.woff2') format('woff2');font-weight:700;font-display:swap}
+ @font-face{font-family:'Merriweather';src:url('fonts/Merriweather-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
</code_context>
<issue_to_address>
**issue (broader_impact):** The page references `fonts/*.woff2`, `assets/mume_logo.jpg`, `assets/map.png`, and `assets/desc.png`, but none of those files exist in the repository. The cinematic intro therefore shows a broken or empty logo, the map and description panels show broken images, and the custom fonts never load.
**Suggested fix:** Add the referenced font and image files under `docs/public/tutorial/`, or change the references to assets that are actually deployed.
</issue_to_address>
### Comment 2
<location path="docs/public/tutorial/index.html" line_range="199" />
<code_context>
+
+<div id="title" aria-hidden="true">
+ <div class="logowrap">
+ <img class="logo" src="assets/mume_logo.jpg" alt="MUME — Multi-Users in Middle-earth">
+ <div class="stripe"></div>
+ <div class="sheen"></div>
</code_context>
<issue_to_address>
**issue (bug_risk):** When the page is opened at the promised `/tutorial` URL without a trailing slash, relative references such as `assets/mume_logo.jpg` and `api/content` resolve from the site root rather than `/tutorial/`. The tutorial then loses its assets and requests the wrong API paths.
**Triggers:** When the web server serves `/tutorial` directly without first redirecting it to `/tutorial/`.
**Suggested fix:** Use `/tutorial/assets/...` and `/tutorial/api/...` paths, or add and verify a redirect from `/tutorial` to `/tutorial/.`
</issue_to_address>
### Comment 3
<location path="docs/public/tutorial/index.html" line_range="270" />
<code_context>
+ "MUME is a MUD: a Multi-User Dungeon. It is a game world made of text, played by hundreds of people at the same time.",
+ "There are no graphics. The game describes a room, and you type what you want to do. That is the whole loop.",
+ "Nothing is on a timer while you read. Take as long as you like."
+ ],
+ "teach": [],
+ "practice": null
</code_context>
<issue_to_address>
**nitpick:** The second lesson renders the sentence “You will being your journey”, which is grammatically incorrect and presents unfinished tutorial copy to new players.
**Suggested fix:** Change “You will being your journey” to “You will begin your journey”.
```suggestion
"As a new player, you'll start on the side of men, hobbits, dwarves and elves. You will begin your journey near the Tower Hills as a new character with only the most basic of equipment. That is normal. Everyone starts there."
```
</issue_to_address>
### Comment 4
<location path="docs/public/tutorial/index.html" line_range="598" />
<code_context>
+ "title": "Dying is not the end",
+ "body": [
+ "You will die. Everybody dies, often, and it is a normal part of the game rather than a failure.",
+ "When you die you wake up in the Halls of Mandos. From here you 'pray <city>\" (ie, \"pray Bree\") to return to one of the towns around Middle-Earth. Your equipment stays behind on your corpse and you can go back for it, or ask someone to help you recover it.",
+ "You do not lose your character and you do not start again."
+ ],
</code_context>
<issue_to_address>
**nitpick:** The death lesson renders an unmatched quote in `pray <city>
**Triggers:** When the player reaches the death lesson.
**Suggested fix:** Fix the content string so the command example has balanced quotation marks, for example `pray <city>` or `"pray <city>"`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and this adds a large interactive page with an editor that stores drafts locally and can publish or create shareable tutorial content through API calls. A faulty version or publication can outlive a revert, but the affected content is bounded and can be restored or republished rather than causing irreversible data loss or access changes.
Blocking findings: docs/public/tutorial/index.html:154, docs/public/tutorial/index.html:199
| } | ||
|
|
||
| /* ===================== cinematic layer (preview only) ===================== */ | ||
| @font-face{font-family:'Kelt';src:url('fonts/kelt.woff2') format('woff2');font-weight:400;font-display:swap} |
There was a problem hiding this comment.
issue (broader_impact): The page references fonts/*.woff2, assets/mume_logo.jpg, assets/map.png, and assets/desc.png, but none of those files exist in the repository. The cinematic intro therefore shows a broken or empty logo, the map and description panels show broken images, and the custom fonts never load.
Suggested fix: Add the referenced font and image files under docs/public/tutorial/, or change the references to assets that are actually deployed.
|
|
||
| <div id="title" aria-hidden="true"> | ||
| <div class="logowrap"> | ||
| <img class="logo" src="assets/mume_logo.jpg" alt="MUME — Multi-Users in Middle-earth"> |
There was a problem hiding this comment.
issue (bug_risk): When the page is opened at the promised /tutorial URL without a trailing slash, relative references such as assets/mume_logo.jpg and api/content resolve from the site root rather than /tutorial/. The tutorial then loses its assets and requests the wrong API paths.
Triggers: When the web server serves /tutorial directly without first redirecting it to /tutorial/.
Suggested fix: Use /tutorial/assets/... and /tutorial/api/... paths, or add and verify a redirect from /tutorial to /tutorial/.
- Fix 'You will being your journey' -> 'begin your journey' - Balance the quotes in the death lesson's "pray <city>" example - boot() no longer fetches api/content (no backend on the static site); it renders the built-in tutorial directly, so no 404 on load - Remove unused assets/content.json (stale duplicate of the inline copy; not referenced by the page)
|
Thanks for the review — all addressed in the latest push:
Also removed an unused |
Per Nils: in MUME 'fill' fills a lantern with oil; a water skin is refilled with 'pour'. Command reference now reads 'pour fountain skin' (syntax: pour source destination), matching the Pour helpfile.
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> |
There was a problem hiding this comment.
Can this be redone to be a Vue component to better fit into the Vitepress site? Also many of these assets already exist and should be re-used rather than duplicated.
Adds a self-contained interactive new-player tutorial at /tutorial.
It walks a brand-new player through their first hour — character creation, movement, the live map and description panels, and staying alive — opening with a short cinematic MUME logo intro.
docs/public/tutorial/(no backend needed); deploys with the site./tutorialinstead of the temporary preview URL.Preview:
docs.mume.org/pr-<n>/tutorial/Summary by Sourcery
Add a static, interactive new-player tutorial at
/tutorialto guide first-time players through the essentials of MUME.New Features:
/tutorialthat introduces new players to MUME’s world, commands, movement, character creation, survival, communication, and progression.Enhancements:
Deployment:
docs/public/tutorial/.