Campaign JSON #9
Labels
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: SketchyMaze/doodle#9
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For single player campaigns, use a custom JSON format for a "campaign.json" that just simply stitches together the built-in levels.
Campaign JSON Format
Definition of interesting campaign properties:
true
then the levels referenced in the campaign JSON can also appear on the "Edit a Level" window.Save File Format (Scores File)
The user's progress on a campaign is saved within their scores file.
Checksum: a very low bar for preventing casual cheaters; the "campaigns" object is serialized to stable JSON and hashed with a built-in secret key and that provides the checksum.
Level passwords: the Level JSON already has a Password field that so far is unused as it's intended for this purpose.
As a validation check against the user just editing their scores.json to mark levels as completed by guessing the name of the next level, the scores.json holds the "password" field which should match with the Level.Password field of the named level.
Campaign Selection UI
From the Main Menu screen, an "Adventure Mode" button would be added.
The Adventure Mode menu would show a list of available campaigns to play.
Large buttons arranged vertically for each campaign, showing the campaign title and description within each button.
Clicking a campaign would enter the Level Select screen, where all the levels in the campaign would be listed as a tiled grid, say 3 wide by 2 tall or such, and pagination buttons in case the campaign has more than 6 levels.
Level buttons would show a lock icon until the user completes the prior levels to unlock the later ones. If the level had been completed, it shows the time and details of the best score obtained.
When a level button is unlocked, the Level Password is shown in the button.
There should be a button to enter a password to unlock future levels. If the password matches a level's within the campaign, the levelsCompleted array in their score.json appends an entry with the level's name and password, but no score information. The level button should then appear unlocked and show its password like the other unlocked levels.
Gameplay
Clicking a level plays it as normal. The Play Scene will be given details about the campaign when called, so that it knows it's in the campaign mode.
When the level goal is reached:
Open/Edit Level
So some Tutorial Levels could both be bundled in a Campaign and also editable by the player so they can study them; or a story mode campaign can hide all of its levels so the player only accesses them via the story mode.