After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664974 - Use a new game screen
Use a new game screen
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: gnomine
trunk
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-27 23:04 UTC by Robert Ancell
Modified: 2012-02-25 09:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Intial attempt at a new game screen for Gnomine. (10.38 KB, patch)
2012-01-10 03:21 UTC, Mike Henning (drawoc)
needs-work Details | Review
Add a new game screen to GnoMine (15.83 KB, patch)
2012-01-15 01:05 UTC, Mike Henning (drawoc)
needs-work Details | Review
Add some colorful text to the new game screen on GnoMine that indicates the sizes of each board. (2.49 KB, patch)
2012-01-16 18:41 UTC, Mike Henning (drawoc)
needs-work Details | Review
Add a new game screen to GnoMine (16.89 KB, patch)
2012-01-29 00:48 UTC, Mike Henning (drawoc)
committed Details | Review

Description Robert Ancell 2011-11-27 23:04:27 UTC
Use a new game screen that shows the game options at the start of a game.  This means that preferences dialogs for game difficulty can be removed and resolves the issue that options can be changed while a game is in progress.  See the Sudoku start screen for ideas.
Comment 1 Mike Henning (drawoc) 2012-01-08 02:26:36 UTC
I'm working on this for a GCI task.

http://www.google-melange.com/gci/task/view/google/gci2011/7230203
Comment 2 Mike Henning (drawoc) 2012-01-10 03:21:47 UTC
Created attachment 204926 [details] [review]
Intial attempt at a new game screen for Gnomine.

Here's my initial attempt at adding a new game screen, if anyone's interested. 

I think I have the UI mostly how I'd like it, except maybe the buttons shouldn't get so big when you maximize it - haven't figured how to set a maximum size.

There are a few bugs I've noticed, and I'm not sure if I caused them or not (I haven't figured out how to reproduce them, but then I haven't tried very hard yet.), so I'm still working on it.
I'll either file different bug reports or fix those bugs in this patch depending on whether they're my fault or not.
Comment 3 Robert Ancell 2012-01-11 07:05:15 UTC
Review of attachment 204926 [details] [review]:

Great work Mike, we absolutely are interested :)

Having the buttons big is good (easy to click on), but they need some more useful content to give the user a hint what will happen when clicking on them.  They could contain the size of each board and the number of mines, or an image showing a minefield with a representative number of mines shown.  I'd like the custom size controls in the new game screen then (or perhaps have a second new game screen that clicking custom shows, e.g.:

+------+ +------+ +------+
|      | |      | |      |
| easy | | med  | | hard |
|      | |      | |      |
+------+ +------+ +------+
                  [custom] (button clicking on shows the screen below)

Width: [10]  (spin buttons)
Height: [10]
Mines: [5]
[cancel] [start]

Also have a look at playing with the relief of the buttons so they don't look so they are big to click on but don't look so "buttony":
http://developer.gnome.org/gtk3/3.2/GtkButton.html#gtk-button-set-relief

I wonder if we need a quick way to restart the current board (perhaps just through a keyboard shortcut?) as a common way of playing is to play multiple games of the same size in a row (to beat high scores).
Comment 4 Robert Ancell 2012-01-11 07:05:16 UTC
Review of attachment 204926 [details] [review]:

Great work Mike, we absolutely are interested :)

Having the buttons big is good (easy to click on), but they need some more useful content to give the user a hint what will happen when clicking on them.  They could contain the size of each board and the number of mines, or an image showing a minefield with a representative number of mines shown.  I'd like the custom size controls in the new game screen then (or perhaps have a second new game screen that clicking custom shows, e.g.:

+------+ +------+ +------+
|      | |      | |      |
| easy | | med  | | hard |
|      | |      | |      |
+------+ +------+ +------+
                  [custom] (button clicking on shows the screen below)

Width: [10]  (spin buttons)
Height: [10]
Mines: [5]
[cancel] [start]

Also have a look at playing with the relief of the buttons so they don't look so they are big to click on but don't look so "buttony":
http://developer.gnome.org/gtk3/3.2/GtkButton.html#gtk-button-set-relief

I wonder if we need a quick way to restart the current board (perhaps just through a keyboard shortcut?) as a common way of playing is to play multiple games of the same size in a row (to beat high scores).
Comment 5 Robert Ancell 2012-01-11 07:07:46 UTC
Also please provide patches by running 'git commit -a' then 'git format-patch origin' - this way they are in a standard format and contain your author information.  You can update the patch by running 'git commit -a --amend'.
Comment 6 Mike Henning (drawoc) 2012-01-12 01:29:06 UTC
If you click on the smiley while on the new game screen, it will default to the last game type played, so if you lose a game, double clicking the smiley will start a new game of the same type. (Winning brings up the dialog, after which you can click on the smiley.)
I'm sure a keyboard shortcut could also be added.

I realized the correct way was to make a commit and use format-patch, but I had no intention to get that patch committed, and running git diff was easier at the moment.

I was thinking the new game buttons could use some pictures, but I'm not a good artist.

I'll also add the custom board options to a separate screen. You're right, they really don't belong under options any more.
Comment 7 Mike Henning (drawoc) 2012-01-15 01:05:33 UTC
Created attachment 205283 [details] [review]
Add a new game screen to GnoMine

Well, I've moved the custom game stuff to its own screen. I also fixed the bugs I mentioned, and I'm ready to have this reviewed.

I'll follow it up with a patch that adds images to the game size buttons, and possibly a patch that adds a button to the "you have won" dialogs that lets you play again with the same board size.
Comment 8 Mike Henning (drawoc) 2012-01-16 18:41:11 UTC
Created attachment 205395 [details] [review]
Add some colorful text to the new game screen on GnoMine that indicates the sizes of each board.

This simply adds text to the buttons that says the number of squares in each board. I reused the colors from the squares to give it a familiar look.
Comment 9 Robert Ancell 2012-01-17 00:59:54 UTC
Review of attachment 205395 [details] [review]:

Patch is generally good, but I'd change two things:
- You can't set the image of a button as that is an optional thing (see http://developer.gnome.org/gtk/unstable/GtkButton.html#gtk-button-set-image).  Instead create an empty button and put custom contents inside it with add ().  So you probably want to pack the labels inside a Gtk.Box (and probably use a Gtk.Alignment to center it).
- I'd also put the number of mines with the size information, e.g. "8x8" "10 Mines".
- With this information you can now drop the "Field Size" label as it is implied by the information given.
Comment 10 Robert Ancell 2012-01-17 01:00:01 UTC
Review of attachment 205395 [details] [review]:

Patch is generally good, but I'd change two things:
- You can't set the image of a button as that is an optional thing (see http://developer.gnome.org/gtk/unstable/GtkButton.html#gtk-button-set-image).  Instead create an empty button and put custom contents inside it with add ().  So you probably want to pack the labels inside a Gtk.Box (and probably use a Gtk.Alignment to center it).
- I'd also put the number of mines with the size information, e.g. "8x8" "10 Mines".
- With this information you can now drop the "Field Size" label as it is implied by the information given.
Comment 11 Robert Ancell 2012-01-17 01:07:52 UTC
Review of attachment 205283 [details] [review]:

Patch is good, it is a definite improvement moving the custom sizes out of the preferences.  Just needs the following fix:
- "Forward" is a bad name for a button - the label should match the action that will be performed.  Clicking on this button starts the game so it should be called "Start Game", "Play" or similar.  Similarly "Back" is more traditionally called "Cancel", but you could perhaps even drop it as starting a new game performs the same action.

It's worth thinking about the layout of the options.  As it stands now you present the user with four choices and give equal weighting to them all.  It will probably be simpler if you make the three main options easy to click on, and the custom option less obvious (it will probably only be used by a very small minority of users).  It's not a blocker to the patch however as these changes are a significant improvement on the current layout and this issue can be resolved in:
http://bugzilla.gnome.org/show_bug.cgi?id=664981
Comment 12 Mike Henning (drawoc) 2012-01-29 00:48:11 UTC
Created attachment 206342 [details] [review]
Add a new game screen to GnoMine

This should fix the things you pointed out. I left the new game screen's layout the same for the time being.

I merged the 2 patches into just one because it didn't make sense to split it between 2 patches anymore.

I also moved the mnemonic for "Horizontal" from the H to the o because I noticed Alt-H is already used for the help menu.
Comment 13 Robert Ancell 2012-02-04 12:21:12 UTC
Review of attachment 206342 [details] [review]:

Great work! I've pushed this with some minor changes.
Comment 14 Robert Ancell 2012-02-25 09:54:47 UTC
Hi Mike,

Can you have a look at bug 670443?  It's about the double-click on the new game button.