Plan out tutorial

main
Elijah C. Voigt 2 years ago
parent 7566ca1ca2
commit 7a72257633

@ -43,6 +43,45 @@ But Can you adapt?
Will you be a part of the universal rhyme, and if so, which side are you on?
"""
[tutorial]
intro = [
"Greetings general, and welcome to 'Martian Advanced Rules for Generals: Long-Term engagement strategies'. As a part of your assignment to operation Red Rocks, it is in your best interest to thoroughly utilize this simulation to best prepare you for engagement with, and strategic domination of, Martian forces.",
"…",
"But first things first! How do you play the dang game?",
]
objective = [
"The Goal of Martian Chess is to have more points than your opponent when the game ends.",
"You get points by capturing your opponent's pieces.",
"The game ends when one player has no more pieces in their zone.",
]
ownership = [
"""
> When player or AI moves a piece across the canal,
This here line is called the canal. And blow me down if she aint a beaut! See herein lies the kicker of Martian warfare: You control any and only the pieces on your side of the canal. When you move a piece across the canal, your opponent assumes control over it.
""",
"Keep playing and try to score some points!",
]
promotions = """
> When player has either no drones or no Queens
Oh and one last thing: real nerds occasionally employ the field promotions strategy. Heres how it works: If you control no drones, you may combine two pawns to make a drone. Similarly, if you control no Queens, you may combine two drones to make a queen.
"""
outro = """
Ok I gotta go now, but You now know enough to prevent human extinction. Do you want to finish this practice round?
"""
[tutorial.pieces]
prompt = "Try picking up a piece"
pawn = "Pawn. The Pawn is worth 1 point, and moves 1 space diagonally. This thing aint worth your time. Put it down."
drone = "Drone. The Drone is worth 2 points, and moves 1 or 2 spaces horizontally or vertically. Neat. Back on the board."
queen = "Queen. The Queen is worth 3 Points, and moves any distance in a straight line. Woah, watch where you point that thing. Best put it back down."
jumping = "Note that jumping is not allowed. Martians banned any and all jumping in their society long ago."
end = "Ok, now move some pieces somewheres!"
[resolution]
x = 640
y = 480

@ -12,6 +12,7 @@ mod intro;
mod loading;
mod menu;
mod prelude;
mod tutorial;
mod tweak;
mod ui;
@ -65,6 +66,7 @@ fn main() {
app.add_plugins(ui::UiPlugin);
app.add_plugins(tweak::TweakPlugin);
app.add_plugins(intro::IntroPlugin);
app.add_plugins(tutorial::TutorialPlugin);
app.run();
}

@ -0,0 +1,60 @@
use crate::prelude::*;
pub(crate) struct TutorialPlugin;
impl Plugin for TutorialPlugin {
fn build(&self, app: &mut App) {
app.add_state::<TutorialState>();
}
}
#[derive(Debug, States, Hash, Default, PartialEq, Eq, Clone)]
enum TutorialState {
#[default]
None,
Intro,
Objective,
PieceIntro,
PieceQueen,
PieceDrone,
PiecePawn,
PieceJump,
PieceEnd,
Ownership,
Promotions,
Outro,
}
// Assertion: "Tutorial" just starts a regular game with TutorialState set to Intro
// This plays out a usual game, but with tutorial text overlayed
// Once tutorial is done, the game can continue as usual
// Intro animations, initialize all text windows but make invisible
// This should be run when TutorialState::Intro
// Start by loading the same game as display3d does
// Show the intro text when entering Intro TutorialState
// Continue
// Show objective when entering Objective TutorialState
// Continue
// Prompt user to click some pieces
// When each piece type is clicked, show relevant text
// Once all pieces are described say jumping text
// Finally end with final text
// Continue
// When a piece crosses the canal, show ownership text
// Continue
// A few moves in, show field promotions text
// Continue
// End with outro text
// Continue
// Play game out as usual
// If player early exits, set TutorialState to None
Loading…
Cancel
Save