Better "it's your turn" notification for multiplay
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
Better "it's your turn" notification for multiplay
Hi guys,
first, thanks for the great game! I've been playing it for a few months now (the only games I play nowadays are wesnoth & slash'em), and recently tried multiplayer with a collegaue.
The problem is that sometimes it takes a looong time for us to make our moves, since we both have work to do. And often we forget to check whether the other has already ended his turn or not.
What I suggest (in the spirit of KISS), is to add an optional feature to the engine that would write out the current game status (just something along the lines of "it's your turn" / "it's NOT your turn") to a file.
Then we (and other people) could make tiny "alert" programs to notify them of the multi's status. For example, on windows, something like ICQ's blinking "you have message" icon. Or a Konfabulator applet on MAC OS X. Or a tray app in KDE.
What do you guys think?
first, thanks for the great game! I've been playing it for a few months now (the only games I play nowadays are wesnoth & slash'em), and recently tried multiplayer with a collegaue.
The problem is that sometimes it takes a looong time for us to make our moves, since we both have work to do. And often we forget to check whether the other has already ended his turn or not.
What I suggest (in the spirit of KISS), is to add an optional feature to the engine that would write out the current game status (just something along the lines of "it's your turn" / "it's NOT your turn") to a file.
Then we (and other people) could make tiny "alert" programs to notify them of the multi's status. For example, on windows, something like ICQ's blinking "you have message" icon. Or a Konfabulator applet on MAC OS X. Or a tray app in KDE.
What do you guys think?
Yes, I see we are thinking along the same lines. The reason I consider the "write-to-file" approach to be better is because of flexibility: there are unlimited ways to get notified by this approach.quartex wrote:An alternative is to have a prefs option that makes a dialog box pop up every time it is your turn, a reminder of sorts.
For example, I use my Windows multi-desktop (Dexpot), so most likely the game's own pop-up window would pop up on different desktop than I'm currently on. (Same problem for most Linux users, I think.)
If someone adds the feature to the game engine, I promise to write the windows-systray based blinking notifier (as time enables). On LGPL licence. (Or whatever the Wesnoth community prefer, BSD, GPL, etc.)
Feel free to submit feature request with all the details:
http://bugs.wesnoth.org -> submit a new bug -> change category to 'feature request'
Why? Because things in forum gets lots and forgotten =)
- Miyo
http://bugs.wesnoth.org -> submit a new bug -> change category to 'feature request'
Why? Because things in forum gets lots and forgotten =)
- Miyo
This was already suggested (by Sirp IIRC).KKovacs wrote:If someone adds the feature to the game engine, I promise to write the windows-systray based blinking notifier (as time enables). On LGPL licence. (Or whatever the Wesnoth community prefer, BSD, GPL, etc.)
And there is already a tray for the KDE/Gnome desktop (westray). It does not really work, it is more a mockup than a real program.

I think that we should do two things in this regard:
- code appropriate platform-specific notifaction, such as demonstrated by ettin
- make it so the user can specify an arbitrary command that is run when it's their turn. You could set this to e.g. xmessage "It's your turn"
David
- code appropriate platform-specific notifaction, such as demonstrated by ettin
- make it so the user can specify an arbitrary command that is run when it's their turn. You could set this to e.g. xmessage "It's your turn"
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Okay I've made it so that you can set the preference turn_cmd in your preferences file to a command, and it will be executed every time it's your turn.
So on GNU/Linux, to make it display an external message dialog every time it's your turn, you can edit ~/.wesnoth/preferences and add,
turn_cmd="xmessage Your turn in Wesnoth&"
(the trailing '&' is recommended to make the dialog launch in a different process; otherwise it will make Wesnoth freeze until you close the dialog)
Different platforms will require different commands, of course.
David
So on GNU/Linux, to make it display an external message dialog every time it's your turn, you can edit ~/.wesnoth/preferences and add,
turn_cmd="xmessage Your turn in Wesnoth&"
(the trailing '&' is recommended to make the dialog launch in a different process; otherwise it will make Wesnoth freeze until you close the dialog)
Different platforms will require different commands, of course.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Windows notifier
As per my promise... a zeroeth version of a tray notifier can be downloaded from: http://www.kkovacs.hu/pub/wesnotify.exe (956 KB).
Usage:
If the program is started without the "-notify" option, then it goes to the system tray (a nice Wesnoth icon), and checks for the existence of the given file (or, if a filename was not given, "turn.txt" in the current directory), and begins blinking when the file gets created (tipically by running from the turn_cmd option that Dave added). No backgrounding (&) needed, it exits immediately when the "-notify" option is given.
When the icon starts blinking, one can stop it by left-clicking it. Then it deletes the notification file.
A right click on the icon exits the notifier program.
(The EXE file is a Tclkit (http://www.equi4.com/tclkit.html): it's a TCL script, the ICO files, and a tcl interpreter packaged in one exe file. It can be un-wrapped, re-wrapped, etc by open source tools downloadable form the above URL. Modify at your will.)
[Edit: image added. Wesnotify is the icon on the left side. The sword blinks on the Wesnoth logo.]
Usage:
Code: Select all
wesnotify.exe [-notify] [filename]
Code: Select all
"wesnotify.exe -notify"
When the icon starts blinking, one can stop it by left-clicking it. Then it deletes the notification file.
A right click on the icon exits the notifier program.
(The EXE file is a Tclkit (http://www.equi4.com/tclkit.html): it's a TCL script, the ICO files, and a tcl interpreter packaged in one exe file. It can be un-wrapped, re-wrapped, etc by open source tools downloadable form the above URL. Modify at your will.)
[Edit: image added. Wesnotify is the icon on the left side. The sword blinks on the Wesnoth logo.]
Thanks.Dave wrote:Looks cool!
I will look into including that with the Windows binary, and then making a simple 'tickbox' in-game option which will choose to activate it.

Then we will need some way to start/stop the "daemon" -- how about a "-start" and a "-stop" command-line option?
We may call it the "Unified Wesnoth Notification Interface"

Ettin, developer of Westray, what do you say?
(Just to sum up: we would have three command line options: -start, -stop, -notify. This should be enough. Maybe a -lose, -win?)