Support for a creating a campaign is now implemented! A campaign can be defined which is a great way of containing a set of connected levels and storyline together into a single beautiful game experience.
A new campaign can be defined by creating a campaign map json file. That file contains a list of Levels which contain the collection of campaign levels, and a Map section which is used to define the campaign map, a graphical way of displaying the levels and the connections between them.
Each campaign level contains a number of fields including the name, description, difficulty etc, as well as a link to the actual battle map.
The campaign map configuration will allow the campaign levels to be placed on a static map with connections and paths between them. New paths and levels will become unlocked when a user plays through the campaign.
Here is a very basic overview of what it looks like:
State
Of course, we want to save the current progress of a player – and we also may want to consider some of the specific actions that a user may do. The campaign can save a bunch of state to a gamefile. This includes the basic stuff such as what levels have been completed etc. However, there is also functionality to add saving state based on actions performed within a battle and read what actions have been performed in the campaign. This allows a lot of flexibility such as if a user completes an extra objective say on one map, a subsequent map may be different or the characters may have slightly different dialog. On the campaign map itself, different options may be available and different paths through the campaign based on users actions.








