Let's make a basic campaign
Build a campaign of three missions from an empty project. Each chapter ends in a game that runs. You end with a hero carried between missions, a base to defend, a night siege, a warlord, an intro and outro made in the editor, a campaign menu with saves, tests, and a page to host.
The finished project is the campaign starter: npm create @v12-engine my-campaign -- --starter campaign. Read it beside the chapters, or skip ahead. Every snippet comes from it.
| Chapter | What it adds |
|---|---|
| 1. The project | A project, what's where, the first map |
| 2. Units, a building, a hero | Unit types, the hall and barracks, a knight who levels up |
| 3. Mission one: the base | Objectives, victory and defeat, an area that triggers dialog, a prefab, an AI that raids |
| 4. Mission two: the siege | Waves with an editor panel, a gate, effects from the rules, night |
| 5. Mission three: the hero | The hero carried over, a shop, a cinematic from a trigger, a dialog choice |
| 6. The intro and the outro | Two cinematics from the Cinematic panel |
| 7. The campaign menu | defineCampaign: menu, progress, saves |
| 8. Tests | Each mission won and lost in a test |
| 9. Ship it | Build, host, and what next |
Keep Missions, dialog and objectives and The map editor open as you go.