Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
482 stars 77 forks source link

Possible "Singleplayer -> Campaign" - Screen #568

Closed lvanderwall closed 1 year ago

lvanderwall commented 8 years ago

I've been thinking about the "Singleplayer -> Campaign" screen that's not yet implemented, and how to improve the original one from S2. I know it's something for the distant future, so it's just a brainstorming to collect a few ideas:

campaign_screen

Store new campaigns (and possibly the campaign progress) in a separate subfolder. People shouldn't need to copy new campaign files into the DATA folder like in the original:

As I said before, it's just a brainstorming to collect some ideas, so feel free to add to them or crush them completely!

Spikeone commented 8 years ago

First of all: I'd not agree that we should use a dropdown menu for Campaign selection, I'd prefer the simple map screen.

For maps I agree we should use a masterfile for a Campaign (possibly not .lua). That file includes: What is the name of the campaign? What are maps used by this campaign? What is the display name of those missions? Default description (should be shown in the selection screen), saved data (for example GF played to master mission xy), progress (is that map playable already or not?).

Also we should keep in mind that the mission screen should be able to handle campaigns with a lot of missions.

So regarding the points: 1) I agree we should show all missions with a state (playable, not playable) but not in general like the original did but maplist 2) As described, we wouldn't need a dropdownmenu 3) Agreed, or the editor should be able to use a displayed picture => If not set show map, if set show picture (e.g. Black with a '?') 4) I don't like the idea of having more and more subfolders - why don't we just name them in a good way? (e.g. crazylmiss1.dat, crazyl_m1.wld, crazyl_m1.lua, crazyl_m2.wld, crazyl_m2.lua etc.) 5) I agree we need an other file to save some general data. Also this masterfile should be able to hold translations for texts, just like wow addons do it in lua

L:RegisterTranslations("enUS", function() return {
    cmd = "Azgalor",

    doom = "Doom",
    doom_desc = "Warn for Doom.",
    doom_other = "Doom on %s",
    doom_you = "Doom on YOU!",

6) Or call enableMission(optional i), if i isn't used, the next mission is enabled, if i is used you can specify which mission is enabled 7) Why don't we just copy the lua files (and master file) to the Data/Maps directory and use that folder for the original mission which is only displayed when using singleplayer -> campaign? If a user has no maps in the directory, he has no propper but... thats not our problem, is it?

Flamefire commented 7 years ago

We can store the campaign progress (which mission is next) in the general settings file. Avoids problems if the maps directory is not writable. The masterfile must be designed carefully. What do we really need?

  1. Name
  2. Description
  3. Author
  4. Map file names or shall we use a clever naming? Maybe both: map names must be same as masterfile but with _m1-9 attached and the master must state the number of missions so we can detect missing ones.

Anything else? Translations are hard. Maybe make ini files with "[Name]" as the section and entries for each language? Map names are even harder because I'd take the name from the map file to keep it consistent with the preview/join screen. But no translations there yet. I would allow subdirs but don't require them.

I like the old mission screen. Why not keep it for mission selection and add a list (similar to map list) before that to select a campaign which is skipped if there only is one?

We can add a campaign mode (need to store the campaign name anyway for enabling the next mission from Lua) so the map preview is not displayed or we can add a Lua function to remove the map preview. I'd go with the latter.

Spikeone commented 4 years ago

While working a bit on the old campaign I was thinking about this topic and the screen.

First of all, I don't think this screen should be for singleplayer only, we might add a multiplayer campaign some day.

For selecting a campaign, one could use the selection of maps screen, but rather than showing maps we should show campaign definitions. I don't think that there should be a preview or description or something like that, although those would be nice additions, they aren't nedded in my opinion.

Once you selected your campaign, you get a map selection as shown above (so more like the original). I'd still switch to the host screen then, on one hand to enable checking settings (custom campaigns) and on the the other to make multiplayer campaigns possible.

The campaign definition file doesn't need much, it's simply the name of the campaign, author, player (so 1 for singleplayer) and a list of maps in order. I don't think we need some fancy decision making (e.g. if you defeat player a) your next mission is 3b, if you defeat player b) your next mission is 3a) so it's simplay a list. In the rttr settings file we should simply store which map has been unlocked (I think much like the original simply 0 or 1 so users can 'cheat').

Flow86 commented 4 years ago

I think we could do it like that: Add a directory "campaigns" where each folder is a campaign. The folder also contains a description file (i.e ini file with description, author, player count, preview image?, maps, etc), the maps and the lua campaign files. Then we show it like the maps selection for Single- and Multiplayer.

What do you think?

Oh and we perhaps can add the original campaign later on too (since it is already a directory :-D)

ottml commented 1 year ago

I would like to implement the campaign screen and the logic behind. I tried out the following gui workflow. It would be nice to have a further dicussion whats the best gui workflow for the campaings. Feedback, suggestions and further ideas for the gui workflow are very welcome.

On the single player screen activate the new "Campaigns" button singleplayerscreen After clicking the button the single player map choose screen opens with the new "Campaigns" entry preselected. The table shows all available campaigns with some additional information as suggested in previous comments.

chooseCampaign

The user can then select one entry within the campaign table. After selection the missions of the campaign are shown. By clicking on a mission the next screen for starting the selected mission is opened.

selectedcampaign
Spikeone commented 1 year ago

First of all, our minimum supported resolution is 1024x768 as far as I remember - one has to always keep that in mind.

Second we need to support 1-n campaign maps which one just needs to consider.

For that reason I'd keep it pretty simple: Use the normal mapscreen layout (just like you did) for campaign selection. After clicking "continue" you jump to the mission selection screen where maybe on top a description is shown (we still need to add some mission.lua file or something alike that has a maporder, possibly an identifier, a description and maybe other things) and below all maps in a 10xN layout where you can scroll (button) throug pages (if more than 10 missions are part of the campaign).

As reference the 1024x768 Screen: grafik

ottml commented 1 year ago

Ok the minimum resolution is a good hint. I put it on one page to not have to switch back to select an other campaign and see it's mission. But yes if we have space limitation it's the better and cleaner solution to put it on a separate page.

campaign_one_screen campaign_missions

A first draft for discussion can be seen in the images attached.

Spikeone commented 1 year ago

I like this idea, although I think having space for a campaign description would be nice.

The page switches might be something like: grafik

On larger resolutions we could use two columns.

ottml commented 1 year ago

I changed the mission screen according to your suggestions. It has now a camapaign description and a added the possibility for any number of missions per campaign with page switch. For the first implementation i would not add two column support for larger resolutions. This can be done later. We should it keep simple for the first implementation.

grafik

ottml commented 1 year ago

I added a pull request as first draft for further discussion.

Spikeone commented 1 year ago

I pretty much like this version (although a page number of 2 seems wrong for 10 missions).

You mind having a draft where on the left side the missions are displayed and on the right side the description text is displayed?

Something like this I'm thinking about (Please ignore the navigation button layout): grafik

ottml commented 1 year ago

Your suggestion can look something like this: mission_descriptio_on_side But after some experiments i would suggest a two widget approach. Like in the following screenshots: two_screen_campaing_selection two_screens1

So you have at the first screen the campaing description onces and not using a lot of space on the mission selection page which is not needed there becaue it's the same for all missions nevertheless. This has also the advantage of a clearer user interface. The user is able to choose the campaign and if he has finished one campaing we are also able to select the next campaign automatically, so the user must not go to the mission selection page every time but can easily click the play capitel button.

Spikeone commented 1 year ago

I honestly liked the first screenshot quite a lot.

In the campaign selection screen I'd rather use a select-switch-button. Which means you click on the button, the button stays clicked, the description is shown, you can click on continue to play that campaign.

So in my game it's like (which pretty much uses buttons which are settlers2-ish): grafik

ottml commented 1 year ago

I added three drafts for campaign selection. The three gui's and workflows can be triggere using the button marked in the screen shot. grafik

  1. Table of campaigns with minimal description. Clicking on campaign opens a new screen with the avalaible missions.
  2. Table of campaigns with minimal description. Clicking on campaign opens a new screen with long description of the campaign. And the possibility to go to another screen to select the mission to play. Or directly play the prechoosen mission.
  3. List of campaigns with advanced description beside (like suggest by @Spikeone). Clicking on campaign opens a new screen with the avalaible missions.
ottml commented 1 year ago

This is no final implementation but only a draft to see the different concepts of campaign selection and try it out which workflow is the best one for the final implementation. Therefore some thinks are not implemented completly and the gui's are only an early draft, which were easy to code.

It would be nice if you can play around with the different workflows and give your feedback how we want proceed and in which direction we will go for the final solution for campaign selection. @Flamefire @Flow86 @Spikeone @lvanderwall