Re: [Wesnoth-dev] What's going on with the new end-of-scenario logic

2007-08-01 Thread Joseph Simmons
I can answer some of your questions:
> * At present, EOS linger is only triggered by victory or defeat.  Quit
>   behavior is unchanged.  There are a couple of other EOS states in
>   WML that I don't understand; "continue" is one of them.  I am not
>   clear on whether they should put the player in linger mode.
>   
Continue probably shouldn't put the user in EOS mode, though I suppose
it _could_ and it wouldn't cause major problems. Continue is used for
talking scenarios,  the difference between it and "victory" being that
it doesn't display a  "VICTORY!  Gold: Turns left: Bonus:" etc message
and it doesn't apply the 20% tax on retained gold. Since there's no
message at the end of continue scenarios telling the user the game is
over, it would probably be confusing to put them in such a situation.

Continue may also be used in some scenarios as a way of removing the 20%
tax, but it shouldn't be. (BTW, I would like to suggest making the
percentage of gold retained customizable in WML... have an attribute in
[endlevel] called retained= that defaults to 80%. Often on RPG scenarios
and such you want to let the user retain all of their gold plus any they
got on the current scenario, and there's no way to do that currently
that I know  of...)
> There is also a related issue about what how to change autosaves, and
> whether it should be changed at all.
>
> My own preference would be to abolish them entirely.  When users want
> to save game, they can use the menu.  This choice is now available 
> at any time, including at EOS.
>
> However, it has been pointed out to me that the other developers like
> having autosave enabled by default because it means they are much more 
> likely to get savefiles with their bug reports.
>
> Matters are further complicated by the fact that SP players tend to
> prefer start-of-turn autosaves, while MPP players tend to like
> end-of-turn autosaves.
>   
Autosaves are good, both for testing, bugfixing, and playing the game.
They shouldn't be deleted, IMHO. It's true that we could force users to
always save when they want to, but that doesn't mean we should - if we
can make something more convenient for the user, we should.

___
Wesnoth-dev mailing list
Wesnoth-dev@gna.org
https://mail.gna.org/listinfo/wesnoth-dev


[Wesnoth-dev] What's going on with the new end-of-scenario logic

2007-07-31 Thread Eric S. Raymond
I have taken the first and largest step in changing the way
end-of-game works in BfW.  Unfortunately, I am also going on vacation
for twelve days starting Thursday (training in sword at a martial-arts
intensive) and will be unable to hack during that time, being
presently without a laptop.  (I will have limited email capability,
however.)

Accordingly, I'm writing here an explanation of what I've done and
what still needs to be done.  I will probably be able to address
some of these issues before I leave.  I'm writing them all down
do that others who feel motivated can work on them while I'm gone.

The effect of the new End-Of-Scenario (EOS) logic is that, in SP mode,
dismissing the victory/defeat popup no longer boots you to the next
scenario.  Instead, you drop into a browse mode where attacks and
moves are disabled, but menu commands are available.  When you click
End of Turn, *then* you go to the next scenario,

The motivation for this is twofold.  First, Zookeeper wanted people in MP games
to be able to stay in-game after victory/defeat, post-mortem it, chat for a 
bit, then *choose* to exit --  rather than instantly being turfed to the 
lobby as they are now.   I haven't implemented this yet.

Second, I wanted to solve a UI issue created when I coalesced the
three obnoxious EOS popups the game used to have into one popup
notification.  Though this was a good change overall, it did have the
effect of reducing the degree of control users had over whether
autosaves got made or not.  My intention was to solve the problem by
nuking *all* autosave options and simply letting the user choose to
save when he/she wants to through the menus, including at end of
scenario after victory/defeat.

After grovelling through the codebase for about a month (refactoring the
editor in the process, and confirming my loathing of C++) I managed to
understand it all well enough to implement EOS lingering in a
fairly simple way.  Essentially the code goes through another
human-turn loop after victory/defeat, but with the browse flag on in
order to disable unit moves.  (A second, auxiliary flag tells it not
to ignore the End of Turn button as browse mode normally does.)  This
mode is encapsulated in a new play_single_controller method called linger().

Issues with this:

* There is at present no visual cue to the player that they're in
  linger mode and need to press End of Turn.  It is all too easy to
  imaging a frustated and not-clued-in user, having dismissed the
  victory/defeat popup, wondering why he's staring at a map screen
  but the mouse doesn't seem to do anything...

There are three things I'd like to do about this:

1. Turn all the unit orbs red. This would be consistent with the fact
   that you can't move units while in EOS linger, and provide a clue
   that it's supposed to be this way.

2. Change the text on the "End of Turn" button to "Finish", "Exit" or
   something like that.  This will require extensions to the theme
   machinery, which I don't understand at all.

3. Possibly color-shift or slightly gray out the display.

* EOS linger is not yet implemented for multiplayer. Fixing this may 
  be as simple as removing the if (io_mode == IO_NONE) part of the 
  conditional guarding the linger() call, or it may require some
  rearrangement of that code with respect to various network handshakes
  about which I have only the very faintest clue.

* Currently, if you are in EOS linger mode and you save a game, there
  will be a "condition" field in the saved code with one of the values 
  "running", "victory", or "defeat".  However, the load code currently does
  nothing with this -- so if you reload such a state, moves and attacks 
  will be allowed again.  This should be fixed; loading a game saved in
  EOS linger mode should drop you back into the same mode.

* At present, EOS linger is only triggered by victory or defeat.  Quit
  behavior is unchanged.  There are a couple of other EOS states in
  WML that I don't understand; "continue" is one of them.  I am not
  clear on whether they should put the player in linger mode.

There is also a related issue about what how to change autosaves, and
whether it should be changed at all.

My own preference would be to abolish them entirely.  When users want
to save game, they can use the menu.  This choice is now available 
at any time, including at EOS.

However, it has been pointed out to me that the other developers like
having autosave enabled by default because it means they are much more 
likely to get savefiles with their bug reports.

Matters are further complicated by the fact that SP players tend to
prefer start-of-turn autosaves, while MPP players tend to like
end-of-turn autosaves.

I'm not sure what the right thing is here.  My own impulse would still be
to scrap autosaves and let the players sort it out.


As I said, I may be able to address some of these before I leave.  If
not, I hope this explanation will prevent progress being blocked while
I'm off a