Eric S. Raymond | 23 Nov 17:38 2007
Picon

General call for help -- I'm stumped

I've been looking for some traction on bug #10354 (Loading linger mode
savegame has problems) for two days.  The symptom is that if you do
a save from linger mode after killing the enemy leader, and then
reload that save, the leader reappears with 0 hit points.

I've gotten nowhere.  The code is just too opaque.  I'm stumped.

Here's what I know: 

1. It does happen in AToTB and Liberty, but *doesn't* happen in AOI.

2. It didn't manifest until I changed the savefile-load code to not fire
the victory event a second time when a linger-mode save is loaded.

I therefore guess that it has something to do with the timing of when
killed units are removed from some internal list, but I don't know any
more than that guess.

I'm also fairly sure this is actually a pre-existing data-management
flaw that linger mode has merely revealed rather than creating.

If anybody out there actually understands the logic around unit deaths
I could use some insight.
--

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

Non-cooperation with evil is as much a duty as cooperation with good.
	-- Mohandas Gandhi
Nils Kneuper | 24 Nov 16:26 2007
Picon
Picon

[Fwd: your game in the messenger (development question)]


I just got a mail from some developer from the filesharing/instant messager
retroshare. I am forwarding it as matiral for discussion/whatever. If I
understood things correctly (you know that I am good at missinterpreting
things...), the question is basically about starting a wesnoth game from withhin
that messager and tunneling traffic over that very port.
Any comments/ideas/whatever about this? I don't have a real opinion about it...
Cheers,
Nils Kneuper

-------- Original-Nachricht --------
Betreff: 	your game in the messenger (development question)
Datum: 	Sat, 24 Nov 2007 15:26:50 +0100
Von: 	Michael Schmidt <schmidtm524 <at> googlemail.com>
An: 	schmidtm524 <at> googlemail.com

Hello,

your game is a multiplayer modus role play game?
we are developing the instant messenger

http://retroshare.sf.net <http://retroshare.sf.net/>
http://sourceforge.net/forum/forum.php?forum_id=618174
<http://sourceforge.net/forum/forum.php?forum_id=618174>

and are currently implementing some games,
would you be interested in adding your game too, so that two chatters
in the chat window can press a button and play your game over the
communication layer of retroshare messenger?

(Continue reading)

Bruno Wolff III | 24 Nov 21:14 2007
Picon

Re: [Fwd: your game in the messenger (development question)]

On Sat, Nov 24, 2007 at 16:26:30 +0100,
  Nils Kneuper <crazy-ivanovic <at> gmx.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I just got a mail from some developer from the filesharing/instant messager
> retroshare. I am forwarding it as matiral for discussion/whatever. If I
> understood things correctly (you know that I am good at missinterpreting
> things...), the question is basically about starting a wesnoth game from withhin
> that messager and tunneling traffic over that very port.
> Any comments/ideas/whatever about this? I don't have a real opinion about it...

I can see how it would be easy to misinterpet as they don't write cleary what
they expect from us. (Probably the author isn't native English speaker.)

The impression I got from the message (which could easily be wrong) is that
they didn't actually play Wesnoth and wanted the current Wesnoth team to
do the work of integrating with their chat program.

I don't really see the point in developing something to work integrated
with their chat program. Wesnoth already has an opponent matching server and
built in chat.
John McNabb | 24 Nov 22:05 2007
Picon

Re: General call for help -- I'm stumped

Ok, here is what I think that is happening based on a quick look over the code.

The unit is killed and the animation triggers.  This then triggers any
events that depend upon the unit death, in this case Mordak's.  Note
that events don't necessarily remove the unit that has been killed,
since the event might be meant to stop the death from happening in
some way (although I don't know off the top of my head an example
where this is done).  Since this particular event has an endlevel
result=victory, the game throws an end_level_exception which used to
proceed to the next level, without finishing the removal of the dead
unit.  Without a linger mode, it was irrelavent.  With linger, the
dead unit isn't removed (although the death animation has taken
place).  Note that when you linger in a broken scenario, if you hover
your mouse over the hex that the unit died in, you will see it's
ghost.

With a linger mode (which is very cool!) I see a couple of
possibilties on how to deal with the problem.
1)  Have all events that trigger off of killed units actually remove
the unit from the game before being triggered, but put them into a
"graveyard" for temporary safekeeping.  An event could then actively
resurrect a unit in the graveyard if that was desired.  Units in the
graveyard could be purged at appropriate times, or kept around for
flavor.
2)  Remove all dead units before their death event triggers.  This
would be simpler, but would stop the use of death events as a means of
preventing death.

Personally, I like 1.  Hmm... I will have to see how difficult a
graveyard would be to implement.  But, don't wait for me, as it has
(Continue reading)

Eric S. Raymond | 24 Nov 22:40 2007
Picon

Re: General call for help -- I'm stumped

John McNabb <mcn4bb <at> gmail.com>:
> Ok, here is what I think that is happening based on a quick look over the 
> code.

I feel fairly sure, just from reading this, that you've nailed it.

> The unit is killed and the animation triggers.  This then triggers any
> events that depend upon the unit death, in this case Mordak's.  Note
> that events don't necessarily remove the unit that has been killed,
> since the event might be meant to stop the death from happening in
> some way (although I don't know off the top of my head an example
> where this is done).

I do.  There are a couple of hero-death events in Northern Rebirth 
attached to white mages that make them immortal -- on death they
teleport back to their side's home keep with their starting HP.

>                        Since this particular event has an endlevel
> result=victory, the game throws an end_level_exception which used to
> proceed to the next level, without finishing the removal of the dead
> unit.  Without a linger mode, it was irrelavent.  With linger, the
> dead unit isn't removed (although the death animation has taken
> place).  Note that when you linger in a broken scenario, if you hover
> your mouse over the hex that the unit died in, you will see it's
> ghost.

This sounds right, though it fails to explain why the bug didn't manifest 
in AIO.

> With a linger mode (which is very cool!) I see a couple of
(Continue reading)

John McNabb | 24 Nov 23:17 2007
Picon

Re: General call for help -- I'm stumped

On Nov 24, 2007 4:40 PM, Eric S. Raymond <esr <at> thyrsus.com> wrote:

> >                        Since this particular event has an endlevel
> > result=victory, the game throws an end_level_exception which used to
> > proceed to the next level, without finishing the removal of the dead
> > unit.  Without a linger mode, it was irrelavent.  With linger, the
> > dead unit isn't removed (although the death animation has taken
> > place).  Note that when you linger in a broken scenario, if you hover
> > your mouse over the hex that the unit died in, you will see it's
> > ghost.
>
> This sounds right, though it fails to explain why the bug didn't manifest
> in AIO.

AIO has a "die" event in it for the bad guys, but it does not have an
endlevel tag inside the event.
Two brothers, does:
        [endlevel]
            result=victory
            bonus=yes
        [/endlevel]
Thus, in AIO, the victory is declared by the default check on whether
the sides have leaders, whereas in Two brothers the victory condition
is set inside the event, thus throwing the end_of_level exception...

--

-- 
-------------------------------------------------------------------
        "In theory, theory and practice are the same,
                 but in practice they're different."
-------------------------------------------------------------------
(Continue reading)

Michael Schmidt | 25 Nov 02:58 2007

Re: [Fwd: your game in the messenger (development question)]

Hi Bruno
thanks for the feedback,
The goal is use the messenger for networking people. Networkign is mroe than chat, and to overgive the IP adresss of the clients automatically, and not manually by entering the IP of the server or other clients.
Furthermore users do not need to forward ports anymore, if the RS com layer is used.
Third, the messenger is a social network, which allows to build a userbase for the game over friends of friends, so a good effect for the disribution.
Of course, the other side is to maybe bundle the messenger with your game, so that users get th experience of both and the synergies.
Please just evaluate the next version, which has then the networkign api/sdk Com layer, before you judge, I guess there is not a lot of code to change, just to make a command line to overgive the IP adresses from the rs friendslist.
So... why not a serverless method in addition to the given one?
Regards Mike
 
2007/11/24, Bruno Wolff III <bruno <at> wolff.to>:
On Sat, Nov 24, 2007 at 16:26:30 +0100,
Nils Kneuper <crazy-ivanovic <at> gmx.net > wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I just got a mail from some developer from the filesharing/instant messager
> retroshare. I am forwarding it as matiral for discussion/whatever. If I
> understood things correctly (you know that I am good at missinterpreting
> things...), the question is basically about starting a wesnoth game from withhin
> that messager and tunneling traffic over that very port.
> Any comments/ideas/whatever about this? I don't have a real opinion about it...

I can see how it would be easy to misinterpet as they don't write cleary what
they expect from us. (Probably the author isn't native English speaker.)

The impression I got from the message (which could easily be wrong) is that
they didn't actually play Wesnoth and wanted the current Wesnoth team to
do the work of integrating with their chat program.

I don't really see the point in developing something to work integrated
with their chat program. Wesnoth already has an opponent matching server and
built in chat.

_______________________________________________
Wesnoth-dev mailing list
Wesnoth-dev <at> gna.org
https://mail.gna.org/listinfo/wesnoth-dev
Eric S. Raymond | 25 Nov 07:54 2007
Picon

Re: General call for help -- I'm stumped

John McNabb <mcn4bb <at> gmail.com>:
> AIO has a "die" event in it for the bad guys, but it does not have an
> endlevel tag inside the event.
> Two brothers, does:
>         [endlevel]
>             result=victory
>             bonus=yes
>         [/endlevel]
> Thus, in AIO, the victory is declared by the default check on whether
> the sides have leaders, whereas in Two brothers the victory condition
> is set inside the event, thus throwing the end_of_level exception...

Yeah, I'd say that confirms it.

I've looked into this, and it isn't going to be trivial to fix.  The
problem is that simply moving the firing of the the die event to after
the unit is deleted would solve this problem, but would make the unavailable 
to find by description when you're scripting death speeches.

I suppose we could have the victory and defeat events do a scavenging pass
that would look for units with HP <= 0 and delete them.
--

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Mark de Wever | 25 Nov 14:03 2007
Picon
Picon

Using compression for savegames and addons

Hi all,

This subject came up on IRC, do we want to use compression on savegames.
I want to look at this subject and try to get it in before the feature
freeze (in about one month).

At the moment we have a broken option to write binary savegames, which
has some compression. Instead of fixing this problem I want to replace
this option to an option to write compressed savegames. 
I want to do the same for the addons on the addon server. (Uploading
will be uncompressed, since the server needs to use some of the send
data.)
I don't want to change the binary wml used for sending network data in 
the MP server.

I want to use zlib[1] to write gzip files and probably use
boost.iostreams[2] to make my life easier. 

Do we want to have the compression and do we want to add the additional
dependencies? 

[1] http://www.zlib.net/
[2] http://boost.org/libs/iostreams/doc/index.html

Regards,

Mark de Wever aka Mordante/SkeletonCrew
Soliton | 25 Nov 13:11 2007

Re: [Fwd: your game in the messenger (development question)]

On Sun, Nov 25, 2007 at 02:58:39AM +0100, Michael Schmidt wrote:
> The goal is use the messenger for networking people. Networkign is mroe than
> chat, and to overgive the IP adresss of the clients automatically, and not
> manually by entering the IP of the server or other clients.
> Furthermore users do not need to forward ports anymore, if the RS com layer
> is used.
I assume you refer to the built-in simple server. However it's not
very well maintained and I'd guess quite rarely used. The usual method
of playing games online is via the dedicated wesnoth server - wesnothd.
With that in mind I don't see how an integration would work or be
desirable.
With the simple server in mind it could work but 1) as said it's not
very well maintained (ie less features some, stuff is broken); 2)
currently you can't start wesnoth and create/connect to a multiplayer
game in one go.
Admittedly 2) wouldn't be a bad feature to have though.

> Third, the messenger is a social network, which allows to build a userbase
> for the game over friends of friends, so a good effect for the disribution.
I don't see how a userbase of "friends of friends" is better than what
we currently have on the official multiplayer server(s).

Gmane