Better "it's your turn" notification for multiplay

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
KKovacs
Posts: 7
Joined: August 25th, 2004, 4:14 pm
Location: Hungary
Contact:

Better "it's your turn" notification for multiplay

Post by KKovacs » August 25th, 2004, 4:22 pm

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?

quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex » August 25th, 2004, 4:32 pm

Sounds like a simple, but useful thing.

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.

KKovacs
Posts: 7
Joined: August 25th, 2004, 4:14 pm
Location: Hungary
Contact:

Post by KKovacs » August 25th, 2004, 5:47 pm

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.
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.

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.)

miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo » August 25th, 2004, 5:52 pm

You can already get [It is your turn] dialog with sound alarm on Wesnoth.

Preferences -> Turn Dialog
Preferences -> Turn Bell

- Miyo

KKovacs
Posts: 7
Joined: August 25th, 2004, 4:14 pm
Location: Hungary
Contact:

Post by KKovacs » August 25th, 2004, 5:55 pm

miyo wrote:You can already get [It is your turn] dialog with sound alarm on Wesnoth.
No, no, it's not the same thing. You see, that dialog appears on the game's window, that I'm not looking at, when I'm working. :-)

Unfortunately sounds are also out of question. :-(

miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo » August 25th, 2004, 6:00 pm

Ahh...

Well you did not say which "alarms" you had enabled =)

- Miyo

miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo » August 25th, 2004, 6:06 pm

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

ettin
Lord of Glamdrol
Posts: 369
Joined: August 17th, 2003, 2:05 pm
Contact:

Post by ettin » August 25th, 2004, 8:06 pm

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.)
This was already suggested (by Sirp IIRC).
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.

Image

Dave
Founding Developer
Posts: 7067
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave » August 25th, 2004, 10:49 pm

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
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming

Dave
Founding Developer
Posts: 7067
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave » August 26th, 2004, 2:53 am

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
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming

KKovacs
Posts: 7
Joined: August 25th, 2004, 4:14 pm
Location: Hungary
Contact:

Post by KKovacs » August 27th, 2004, 7:41 am

Dave wrote: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.
Great, thanks, Dave!

KKovacs
Posts: 7
Joined: August 25th, 2004, 4:14 pm
Location: Hungary
Contact:

Windows notifier

Post by KKovacs » August 28th, 2004, 1:26 pm

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:

Code: Select all

wesnotify.exe [-notify] [filename]
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

Code: Select all

"wesnotify.exe -notify"
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.]

Dave
Founding Developer
Posts: 7067
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave » August 28th, 2004, 2:25 pm

KKovacs,

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.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming

KKovacs
Posts: 7
Joined: August 25th, 2004, 4:14 pm
Location: Hungary
Contact:

Post by KKovacs » August 28th, 2004, 2:48 pm

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.
Thanks. :D

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" :-) or something like that, and program other operating system's notifiers a similar way. Maybe it would be easier to other notifier-writers too. Ready-made integration.

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?)

Dave
Founding Developer
Posts: 7067
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave » August 28th, 2004, 2:49 pm

Yeah I will probably do it the same as clipboard interaction: put a place in the source where people can add tray notification suitable for their platform :)

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming

Post Reply