[PATCH] Implement campaign level selection GUI
|Reported by:||wraitii||Owned by:||wraitii|
|Priority:||Must Have||Milestone:||Alpha 25|
|Component:||UI – Miscellaneous||Keywords:||patch|
Description (last modified by )
Single players campaigns are one of the features we recently felt would be interesting to have for Part A. I have done some work on a github branch, and arrived to something usable, so I'm creating this ticket to get some comments (not necessarily a formal review yet).
Github branch: https://github.com/wraitii/0ad/tree/campaignMode For a readable clean diff, see attached patch, my branch is full of reversions and experiments.
Features are explained in detail in this post https://wildfiregames.com/forum/index.php?/topic/21369-single-player-campaigns/ Also refs #3049.
Basically: -adds a "campaigns" folder to public, with .json files specifying campaigns. -adds necessary GUI files, with a point of separating the interface logic (respectively in simple_campaign and simple_setup) so that this can be easily modded and we can provide several versions for campaigns to choose from -adds a "campaignsaves" folder to the user directory, saving campaign files as JSON -Hooks to session.js/summary.js/GuiInterface to send game data to the campaign state at the end of the game if necessary. -Provides campaign data to games at the start through a custom (and currently very ugly) gameosetup.
Overall the architecture is relatively simple. I'm only implementing simple lists for now. Also so far only scenarios are supported.
Design questions: -should maps only be supported in "maps/campaigns"? -it's slightly annoying that images have to be in art/textures/ui for sprites. -features?
As example, a fake "example" campaign is provided and I added a "tutorial" campaign but it's kind of empty.
Change History (15)
comment:7 by , 4 years ago
|Milestone:||Work In Progress → Alpha 22|
|Priority:||Should Have → Must Have|
comment:9 by , 3 years ago
|Summary:||[PATCH] Implement Single-Player (SP) campaigns → [PATCH] Implement campaign level selection GUI|