URL:
  <http://gna.org/bugs/?13118>

                 Summary: Risk of OOS with hidden units
                 Project: Battle for Wesnoth
            Submitted by: alink
            Submitted on: Thursday 03/05/2009 at 19:49
                Category: Bug
                Severity: 5 - Blocker
                Priority: 7 - High
              Item Group: Multiplayer
                  Status: None
                 Privacy: Public
             Assigned to: jhinrichs
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: RC1
        Operating System: all

    _______________________________________________________

Details:

It's mainly pathfinding difference between clients.

But first, I think that we must revert r32669
 http://svn.gna.org/viewcvs/wesnoth?rev=32669&view=rev
or at least the part where we now do a real move of unit, instead of just
drawing one. The commit doesn't say what event was not being triggered, seems
to be "move" events (possibly "sighted" event, but was never replay-safe, and
will probably never be). In that case just firing it manually in replay code
may fix this.

The core of this problem is that we just send source and destination of the
move action, letting local pathfinding found a path between them and assume
that it will be the same as the sender really used. The 1.4 version was
already horrible about that, because it didn't even used the same pathfinding
algorithm ("paths" instead of A*)
I tried to improve that with r27830:
http://svn.gna.org/viewcvs/wesnoth?rev=27830&view=rev
But at that time is was only a visual glitch, for example the receiver could
see (enemy) sender's unit pass by the hex of his hidden unit.

This old system is not safe because, any difference between two clients could
cause different pathfinding results. Which is mainly a problem when the
receiver solution pass near an ambushed unit, but it's also less good for the
gameplay, because you have false assumptions on which hexes your opponent know
to be ambush-safe or the fog he has cleared.

Track and fix all of these pathfinding differences is probably too much work
and we will never be sure to get them all (I already see potential problems
with multi-turn moves from mouse or goto, AI, fog or discovered hidden units
not up-to-date)

Note that using different paths may also cause an OOS bug about the move_left
(bug #12467)

So, I suggest:
- Get back to a purely visual move, send "move" event, and forget fog and
"sighted" event in replay (I believe it's only a problem if they modify the
game state)

- Transmit the move_left in the [move] data, to be sure to avoid the
move_left bug
OR (and better I think)
- Transmit the path in the [move] data, that is something like
path=3,3,4,3,5,3... or x=3,4,5 and y=3,3,3

I think there is also future plan with a "pass by this hex" event which will
need exact path.

But sadly all of this will break compatibility with RC1, and it's a bit late
for such change. OtOH it may prevent OOS troubles in 1.6

PS: YogiHH, assigned it you to get your opinion and possibly let you fix the
problem (you know this code better than me), but I am available for help or
coding about this (I also have other work which will depend how this stuff
change or not)





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?13118>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to