125 lines
6.4 KiB
HTML
125 lines
6.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" data-theme="dark">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Spearhead Lanes</title>
|
|
<link rel="stylesheet" href="/style/style.css">
|
|
<script src="/js/site.js"></script>
|
|
<style>
|
|
.side-nav a.active {
|
|
font-weight: bold;
|
|
color: #4fc3f7;
|
|
}
|
|
</style>
|
|
<script type="module" src="/js/components.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<app-header></app-header>
|
|
</header>
|
|
<main>
|
|
<div class="reference-container">
|
|
<app-sidebar></app-sidebar>
|
|
|
|
<div class="content-wrapper">
|
|
<h1>Lanes</h1>
|
|
|
|
<p>
|
|
If up to now you've used mission stages like <code-inline>MISSIONSTAGE_1_STAGE</code-inline> you've been using the main lane. <br>
|
|
This is the default or "main" lane, however, if you wanted to mix things up and create a more dynamic mission, you can use additional lanes. <br>
|
|
Each lane can have its own set of mission stages, allowing for parallel or branching mission objectives.
|
|
</p>
|
|
|
|
<h2 id="how-it-works">How To</h2>
|
|
<h3 id="define-lanes">Define Lanes</h3>
|
|
<p>
|
|
Lanes are defined implicitly in the naming convention of the <code-inline>MISSIONSTAGE_</code-inline>. <br>
|
|
A lane is identified by a single character (alpha [A-Z]), which gives you 26 unique lanes. <br>
|
|
For example, <code-inline>MISSIONSTAGE_A1_[name]</code-inline> would belong to lane A. <br>
|
|
<br>
|
|
If there is no lane character specified, the stage belongs to the main lane. <br>
|
|
<br>
|
|
The 26 lane limit is only relevant if you want 26 lanes at the same time. <br>
|
|
But splitting up lanes (eg. (1-4 and 10-15) ) you can easily have more than 26 stages throughout your entire mission. <br>
|
|
<br>
|
|
Lanes don't have to start at index 1. as in the example lanes can easily start at any index. <br>
|
|
How lanes are then activated and activate other lanes is described below in the Dependencies Explained part.
|
|
</p>
|
|
<h3 id="dependencies">Dependencies Explained</h3>
|
|
<p>
|
|
When we are talking about lanes it's important to make the distinction between the main lane and additional lanes. <br>
|
|
The main lane is not only the default, but it's also the central lane that other lanes depend on. <br>
|
|
|
|
<h4>Chapters</h4>
|
|
Another term that we have used in the code is `Chapter` which refers to a grouping of mission stages within a lane. <br>
|
|
These are implied and cannot be directly controlled or altered. <br>
|
|
A chapter is a set of `MissionStage`s that are directly connected. <br>
|
|
For `MissionStages` `[ A1, A2, A3, A5, A6]` there are 2 chapters: `[ A1, A2, A3]` and `[ A5, A6]`. <br>
|
|
Within a chapter the stages are only directly dependent on each other. Meaning A2 will start when A1 is completed. <br>
|
|
<br>
|
|
However, the chapter start is where the inter-lane dependencies come into play. <br>
|
|
These operate a little differently. <br>
|
|
<br>
|
|
In the Visual example you can see the Stages grouped into chapters by the red boxes. <br>
|
|
|
|
<h4>Side Lane Chapter start</h4>
|
|
|
|
<p>
|
|
Side lane chapters are started when all are true:
|
|
<ul>
|
|
<li>The main lane is at or above the current stage lane number.</li>
|
|
<li>All previous chapters in the same side lane have been completed.</li>
|
|
</ul>
|
|
</p>
|
|
|
|
<h4>Main Lane Chapter start</h4>
|
|
<p>
|
|
Main lane chapters are started when all are true:
|
|
<ul>
|
|
<li>The previous chapter in the main lane has been completed.</li>
|
|
<li>All side lanes are at or above the current stage lane number or the side lane has no additional stages.</li>
|
|
</ul>
|
|
</p>
|
|
</p>
|
|
|
|
<h2 id="visual">Visual</h2>
|
|
<p>
|
|
The image below illustrates how different lanes can be used within a mission. <br>
|
|
In the example you can see how the dependency between the main lane and side lanes works. <br>
|
|
An arrow means that the completion of one stage is required before the next stage can begin.
|
|
</p>
|
|
<img src="/img/lanes.png" alt="Example of mission lanes">
|
|
|
|
<h2 id="mermaid">Mermaid</h2>
|
|
<p>
|
|
Spearhead automatically exports a spearhead diagram to the logs on starting a mission. <br>
|
|
This can be handy to visualize the logic and lanes you've created and verify your mission flow will be the way you want it. <br>
|
|
</p>
|
|
|
|
<h3 id="mermaid-log-example">Log Example</h3>
|
|
<p> TODO: Show log example</p>
|
|
|
|
<h3 id="mermaid-diagram-example">Diagram Example</h3>
|
|
<p> TODO: Show diagram example</p>
|
|
|
|
<h2 id="lane-limitations">Limitations</h2>
|
|
<h3 class="lane-limitations-cap">CAP</h3>
|
|
<p>
|
|
Due to the CAP naming conventions, we've opted to currently have CAP only react with the main lane. <br>
|
|
This might mean a bit less flexibility when using lanes for major mission logic, however, it's a limitation we've accepted for now. <br>
|
|
In the future we might be able to extend CAP's interaction with other lanes as well. <br>
|
|
Currently <a href="https://git.dutchie031.com/Spearhead/spearhead/issues/47">this issue</a> can be tracked here.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
<footer>
|
|
<p>© 2025 Spearhead Project</p>
|
|
</footer>
|
|
</body>
|
|
|
|
</html> |