|
| 1 | +# ThumbCommander Campaign Mode |
| 2 | + |
| 3 | +This document explains how to use the campaign mode in ThumbCommander and add own campaigns. |
| 4 | + |
| 5 | +## Implementation Steps |
| 6 | + |
| 7 | +Campaigns are stored in JSON files in the ThumbCommander directory. |
| 8 | +To remove campaigns, simply delete the respective JSON file. |
| 9 | +Create campaign JSON files with your missions and stories. Only file in the format '*_campaign.json' are picked up! |
| 10 | + |
| 11 | +## Campaign JSON Structure |
| 12 | + |
| 13 | +Campaigns are defined using JSON files in the following format: |
| 14 | + |
| 15 | +```json |
| 16 | +{ |
| 17 | + "title": "Campaign Title", |
| 18 | + "description": "Short description for selection screen", |
| 19 | + "intro": "Long introduction text shown at the start of the campaign", |
| 20 | + "outro": "Text shown upon campaign completion", |
| 21 | + "missions": [ |
| 22 | + { |
| 23 | + "name": "Mission Name", |
| 24 | + "briefing": "Text shown before the mission", |
| 25 | + "debriefing": "Text shown after completing the mission", |
| 26 | + "config": { |
| 27 | + "type": "dogfight|asteroids|mixed", |
| 28 | + "enemies": 1, |
| 29 | + "asteroids": 10, |
| 30 | + "difficulty": 1 |
| 31 | + } |
| 32 | + }, |
| 33 | + // More missions... |
| 34 | + ] |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +### Mission Configuration Options |
| 39 | + |
| 40 | +- `type`: Determines the mission type |
| 41 | + - `dogfight`: Only enemy ships |
| 42 | + - `asteroids`: Only asteroids |
| 43 | + - `mixed`: Both enemies and asteroids |
| 44 | +- `enemies`: Number of enemy ships (for dogfight and mixed types) |
| 45 | +- `asteroids`: Number of asteroids (for asteroids and mixed types) |
| 46 | +- `difficulty`: Value from 1-4 that affects enemy health, speed, and number of objects |
| 47 | + |
| 48 | +### Mission Completion Mechanics |
| 49 | + |
| 50 | +In campaign mode, missions now have a two-phase completion process: |
| 51 | + |
| 52 | +1. **Objective Phase**: Player must complete all specified objectives (time and/or kills) |
| 53 | +2. **Cleanup Phase**: After objectives are met, no new enemies or asteroids will spawn, but the player must eliminate all remaining enemies and asteroids to complete the mission. During this cleanup phase, a "CLEAR ALL!" message appears to indicate that the player should destroy all remaining enemies and asteroids. |
| 54 | + |
| 55 | +If the player dies at any point before completing both phases, the mission fails and must be restarted (with a limited number of attempts). |
| 56 | + |
| 57 | +In non-campaign mode (regular gameplay), the original endless gameplay mechanics remain unchanged. |
| 58 | + |
| 59 | +## How to Create a Campaign |
| 60 | + |
| 61 | +1. Create a JSON file with the structure shown above |
| 62 | +2. Name it something descriptive ending with `_campaign.json` (e.g., `tc1_campaign.json`) |
| 63 | +3. Save it in your ThumbCommander directory |
| 64 | + |
| 65 | +**Campaign Order**: Campaigns are displayed in alphabetical order based on their filenames. To control the display order, use filename prefixes like `01_campaign.json`, `02_campaign.json`, etc. |
| 66 | + |
| 67 | +### Campaign Progression and Saving |
| 68 | + |
| 69 | +The game automatically saves progress after each mission. Players can: |
| 70 | +- Continue from their last mission |
| 71 | +- Start a new campaign |
| 72 | +- Save and exit after a mission |
| 73 | + |
| 74 | +## Available Campaign Files |
| 75 | + |
| 76 | +Four sample campaigns are included: |
| 77 | +1. 'astroid_campaign.json' - A pure Astroid Dash Campaign. |
| 78 | +2. 'tc1_campaign.json' - Some fun mix between astroid fields, dog fights and both together to show the capabilites of the engine |
| 79 | +1. `tc2_campaign.json` - Thumb Commander Legacy: Vega Campaign - To dive back into the 90s |
| 80 | +2. `tc3_campaign.json` - Thumb Commander Legacy II: Vengeance - dive back again and enjoy the sequel |
| 81 | + |
| 82 | +## More to come |
| 83 | + |
| 84 | +The Campaign Engine will be further extended in the future: |
| 85 | +1. Multi battles per mission |
| 86 | +2. Adding new mission types |
| 87 | +3. Modifying the difficulty scaling |
| 88 | +4. Adding special mission objectives |
| 89 | + |
| 90 | +## Troubleshooting |
| 91 | + |
| 92 | +If you encounter issues: |
| 93 | +- Ensure campaign JSON files are correctly formatted |
| 94 | +- Check that the files are in the correct directory |
| 95 | +- The Thumby has limited memory. Extensive text in the campaign files will quickly bring him to OutOfMemory Exeception! |
0 commit comments