A12: Tutorial
A short, skippable tutorial on an island of your own: leave the barge, glide down, walk and jump, cut materials with the boathook, place a wall, aim and fire, and get above the line the tide will reach after its next rise. - MatchRules.tutorial(): one player, no bots, last_team_wins off (alone is not a win, only the tide or a fall ends it) and starting_kit (a dock carbine with a full magazine and 60 cartridges, Tuning.TUTORIAL_KIT). Both rules go in command logs; older logs read with the defaults. - Tutorial watches the client's own view (predicted player, world copy, FX) and moves on when each step is done. Instructions name the player's own key bindings. TutorialCard shows it under the minimap. - TutorialPilot plays it through ClientInput for --tutorial --autoplay, the tests and make tutorial-check (12 seeds, all finish). - First launch offers it (welcome screen, remembered in settings); it is always on the main menu; Leave in the pause menu skips it. Finishing is saved. --tutorial on the command line. - make tutorial-captures; PLAY.md, the man page, ARCHITECTURE.md and CLAUDE.md updated. Closes #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+28
-3
@@ -1,5 +1,5 @@
|
||||
## The game's menus (A10), in the paper-and-ink motifs of docs/STYLE.md: the main menu,
|
||||
## practice against bots, joining a server (with the LAN and list-server browser),
|
||||
## The game's menus (A10), in the paper-and-ink motifs of docs/STYLE.md: the welcome
|
||||
## that offers the tutorial on the first launch (A12), the main menu, practice against bots, joining a server (with the LAN and list-server browser),
|
||||
## settings (controls, mouse, graphics, audio, display), the pause menu and the results.
|
||||
##
|
||||
## Menus only edit `settings` and say what the player asked for through signals; the
|
||||
@@ -10,13 +10,14 @@ class_name Menus
|
||||
extends Control
|
||||
|
||||
signal practice_requested(bots: int, difficulty: int, team_size: int)
|
||||
signal tutorial_requested
|
||||
signal join_requested(host: String, port: int, player_name: String)
|
||||
signal resume_requested
|
||||
signal leave_requested
|
||||
signal quit_requested
|
||||
signal settings_changed
|
||||
|
||||
const SCREENS: Array[String] = ["main", "practice", "join", "settings", "pause", "results"]
|
||||
const SCREENS: Array[String] = ["welcome", "main", "practice", "join", "settings", "pause", "results"]
|
||||
const PANEL_WIDTH: float = 560.0
|
||||
const FONT_TITLE: int = 40
|
||||
const FONT_HEADING: int = 24
|
||||
@@ -89,6 +90,7 @@ func _init() -> void:
|
||||
shade.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
shade.visible = false
|
||||
add_child(shade)
|
||||
_build_welcome()
|
||||
_build_main()
|
||||
_build_practice()
|
||||
_build_join()
|
||||
@@ -337,6 +339,7 @@ func _build_main() -> void:
|
||||
notice.add_theme_color_override("font_color", Palette.OCHRE_RED)
|
||||
column.add_child(notice)
|
||||
_button(column, "Practice against bots", func() -> void: show_screen("practice"))
|
||||
_button(column, "Tutorial", _start_tutorial)
|
||||
_button(column, "Join a server", func() -> void: show_screen("join"))
|
||||
_button(column, "Settings", func() -> void: show_screen("settings"))
|
||||
_button(column, "Quit", func() -> void: quit_requested.emit())
|
||||
@@ -349,6 +352,28 @@ func _build_main() -> void:
|
||||
column.add_child(build)
|
||||
|
||||
|
||||
## The first launch (A12): the tutorial, or straight on. Either answer is remembered,
|
||||
## and the tutorial stays on the main menu.
|
||||
func _build_welcome() -> void:
|
||||
var column: VBoxContainer = _panel("welcome", "Welcome aboard")
|
||||
var note: Label = _note(column)
|
||||
note.text = "New to Tidewall? A short tutorial on an island of your own shows you how to drop, gather, build, fight and keep ahead of the tide. It takes a few minutes, and you can leave it whenever you like from the pause menu."
|
||||
_button(column, "Start the tutorial", _start_tutorial)
|
||||
_button(column, "Not now", func() -> void:
|
||||
settings.tutorial_offered = true
|
||||
save_settings()
|
||||
show_screen("main", false))
|
||||
var later: Label = _note(column)
|
||||
later.text = "The tutorial is always on the main menu."
|
||||
later.modulate.a = 0.7
|
||||
|
||||
|
||||
func _start_tutorial() -> void:
|
||||
settings.tutorial_offered = true
|
||||
save_settings()
|
||||
tutorial_requested.emit()
|
||||
|
||||
|
||||
func _build_practice() -> void:
|
||||
var column: VBoxContainer = _panel("practice", "Practice")
|
||||
_bots = SpinBox.new()
|
||||
|
||||
Reference in New Issue
Block a user