Bug 12368 - Grave issues handling times in OnlineBoard
: Grave issues handling times in OnlineBoard
Status: CLOSED FIXED
Product: Miniature
UI
: master
: All All
: High critical (vote)
: 0.4
Assigned To: Michael Hasselmann
: general
:
:
:
: 12372
  Show dependency tree
 
Reported: 2011-09-02 06:48 UTC by Quim Gil
Modified: 2011-09-18 07:58 UTC (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Quim Gil (reporter) 2011-09-02 06:48:00 UTC
- Currently the times shown in the OnlineBoard header and timers are hardcoded,
and they should be the ones corresponding to the real game.

- When a false move is done (after pressing "+") the timer goes automatically
to the other player without checking whose is in reality the turn.
Comment 1 Quim Gil (reporter) 2011-09-02 06:48:36 UTC
Assigning to me.
Comment 2 Quim Gil (reporter) 2011-09-02 21:24:59 UTC
mikhas, is there a signal or something I can use to know which side is playing?
I'm looking at miniature.cc but I can't find anything

Now the timers behavior depend on really fragile calculations of which color is
playing, which was fine for UI demos but is not enough in real games. For
instance, currently it is assumed that each time the confirmed button is
pressed, the side changes - which is not true for wrong moves.

What the frontend needs is to know for sure which side is playing: local or
remote. Thanks!
Comment 3 Michael Hasselmann 2011-09-09 00:27:32 UTC
Taking. Will add active side signals but also forward the timer information.
Comment 4 Quim Gil (reporter) 2011-09-10 00:40:33 UTC
Hi, I'm trying to understand how to operate with all the new code that has
landed. Let me explain in human language what OnlineBoard must do, please help
me to fill the gaps with the variables from the backend I must use. Thanks!

1. Game starts, user jumps from SeekGame to OnlineBoard. DONE

2. The header must show the data of the active game. Are the variables to use
activeGame.time - activeGame.increment a- activeGame.rating ?

4. The counters must show a variable too. For the beginning of the game could
also be activeGame.time although during the game the backend provides the
values of each timer in the FICS server. Which are these variables for local
and remote?

5. In order to start the correct timer, the frontend needs to know who is
white: local or remote. What is the variable bringing this value?

6. Whenever there is a turn change the corresponding timer will stop and update
to the value provided by the server, and the other times will start. What is
the signal marking the change of turn?

So mikhas, here you have the template to fill:  ;)

- Time of the active game:
- Increment of the active game:
- Rating of the active game:
- What color is local (or who is white):
- Server time for local:
- Server time for remote:

Thanks!
Comment 5 Michael Hasselmann 2011-09-10 17:22:17 UTC
Fixed in commit 8f56e7100c57bf4cbe37128f56643563b4084ba0. 

I moved the timer handling into the backend, as there seem to be problems when
chaining up QML properties (property bindings are apparently not transitive).
Comment 6 Quim Gil (reporter) 2011-09-10 23:18:15 UTC
Great! I played my first game with real time: nice!

There is a little detail: the time must start to run only after white and black
have moved once. Since we're syncing with the FICS server this is not grave,
but aesthetically needed. Do you want me to handle this in the frontend or do
you prefer to fine tune the backend?
Comment 7 Michael Hasselmann 2011-09-10 23:21:09 UTC
(In reply to comment #6)
> Great! I played my first game with real time: nice!
> 
> There is a little detail: the time must start to run only after white and black
> have moved once. Since we're syncing with the FICS server this is not grave,
> but aesthetically needed. Do you want me to handle this in the frontend or do
> you prefer to fine tune the backend?

This is a FICS detail, meaning the engine must handle it, not the frontend.
Postponed for after 0.4 though.
Comment 8 Michael Hasselmann 2011-09-10 23:31:02 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Great! I played my first game with real time: nice!
> > 
> > There is a little detail: the time must start to run only after white and black
> > have moved once. Since we're syncing with the FICS server this is not grave,
> > but aesthetically needed. Do you want me to handle this in the frontend or do
> > you prefer to fine tune the backend?
> 
> This is a FICS detail, meaning the engine must handle it, not the frontend.
> Postponed for after 0.4 though.

Well, if you add a bold comment that this needs to be handled by the FICS
engine blah blah then of course you can add the workaround in the QML UI, for
now.
Comment 9 Quim Gil (reporter) 2011-09-11 02:32:49 UTC
Actually it's not that bad, and people that haven't played with FICS before
won't even notice. The rest might notice but at the end will have the exact
same time to play. Verifying this bug. I will open a new one for the specific
detail if it's something really evident or annoying over time.
Comment 10 Michael Hasselmann 2011-09-11 02:35:53 UTC
A new enhance bug against the engine then, so that we don't forget about it?