ksudoku's move to kdereview

Andreas Hartmetz ahartmetz at gmail.com
Mon May 7 03:50:31 BST 2007

On Monday 07 May 2007 04:18:50 Robert Knight wrote:
> Hi Josel,
> I have played around with ksudoku a little.  Some comments:
> 1.  For a Sudoku game, the interface looks very complicated on
> startup.  I think a simple and tidy interface is important not to
> scare away people looking for a distraction ( once you get them
> hooked, they will stay for more ).  Some of this I think can be easily
> remedied:
> - There is a toolbar with the numbers 1 to 9 on it.  Is this really
> necessary? - The contents of the "Web" menu can be put in the Help menu
> - The "Select Number" menu is in the same situation as the toolbar, I
> don't think it is really very useful because selecting an item from it
> is a slow task to perform ( You have to click on the menu item, scan
> for the appropriate letter, move the mouse to it, select it and then
> rinse and repeat )
> - Can the contents of the "Options" menu be put in the Settings menu?
> - The Undo / Redo actions are duplicated in the Edit and Move menus.
> Since these are the only items in the Edit menu, removing them means
> that whole menu can be removed.
> I found the startup screen a little confusing for a couple of reasons.
>  Firstly there are a lot of options and other UI elements ( including
> the toolbar which is not relevant outside of actual gameplay ) on
> screen when you start the application.   I can think of a couple of
> approaches:
> A:  Most games tend to take a "story-board" approach to setting up a
> game, where you select the game options on a series of screens.  As
> opposed to having all the options on one screen.  Each screen is
> typically fairly simple with only one decision available on each
> screen, and only four or five clickable elements on screen.
> So for example, on startup you go through a sequence:
> [ Game Type Screen ] -> [ Difficulty Screen ] -> Play!
> Where the "Game Type" screen would show maybe four or five pictures
> for the different types of Sudoku board available.  The difficulty
> screen would then display three buttons - one for "Easy", one for
> "Medium" and one for "Advanced"
> A welcome screen was recently added to KBattleShip which implements
> this, hopefully you could make use of that code.
> B:  Another approach used in other kde games is to start up and go
> straight into the game using sensible default settings.  In the case
> of Sudoku, probably a straightforward 9x9 grid with an easy difficulty
> level.  The user can then change the game type using the menu.
> 2.  I found all the colored areas drawn as you move the cursor around
> on the game board quite distracting.  There is a strong blue
> background, the current segment highlighted in green and the current
> row in a red color.  This makes it harder to read the numbers in the
> cells.
> 3.  I wasn't sure how to enter numbers int cells at first, because the
> cells do not change their appearance when you click on them to
> indicate that you can enter a number.
> 4.  There are some performance problems.  The minor one is the
> perceptible delay after pressing a number before the cell under the
> mouse cursor is filled in ( perhaps 200-300 ms or so ) - especially
> with large games.  I think this delay contributed to (3) because I
> pressed a number key on my keyboard and had to wait a moment before
> the cell got filled in.  I had a quick look using callgrind and there
> was nothing very obviously wrong, and most of the timer spent in
> SKSolver::solve_engine as one might expect.  It looks like you have
> already spent quite some time on this, and Sudoku is a hard problem -

Yeah, congratulations on the solver engine. ksudoku's seems to be pretty 
clever if you compare its runtime to runtime estimates for sudoku solvers 
found on the internet.

> so perhaps the easiest option is to tweak the user interface such that
> the number appears as soon as you press the key, while any
> computations that it triggers happen in the background.
> Rendering large ( eg. 25x25 ) Sudoku boards is somewhat slow.
> Looking at your code, it seems that you are using a QWidget for every
> tile on the board.  So for a 25 * 25 board, that means 625 widgets.
> Widgets are heavy resource-wise and not designed to be used like this.
>  The Qt 4 Graphics View framework is a much better fit for what you
> are trying to do.  With QGraphicsView,  you have only one QWidget on
> screen, rendering the contents of a QGraphicsScene.  Each tile then
> becomes a much lighter-weight QGraphicsItem object.  I don't have
> experience converting games over to the QGraphicsView framework, but
> the kde-games developers do - I would suggest asking them about this.
> I think it is very much worth doing though, not only for performance
> but also for the pretty effects and extras that are made much easier
> with it.
> 5.  The 3D Sudoku mode is quite interesting - although I didn't know
> from the game setup screen that is what it was. Perhaps include the
> phrase "3D Sudoku" somewhere?
While the concept ist interesting (and well-known on the internet as it 
seems), I found it difficult to impossible to see all the relevant fields at 
once while playing. Now this is not an easy problem to solve and I really 
can't blame you for it. You probably have noticed it yourself already :/
It might be a good idea to just remove this mode for the time being if you 
don't manage (or don't care) to make it easy to use. A feature that few 
people use (unscientific guess) and that's very hard to use might be better 
left out to make the overall impression of a game that's easy to use.

Another idea is to add it as an easter egg (not too difficult to find) so that 
users don't stumble upon it right away. Easter eggs are not expected to be 
I, for one, like finding silly little secrets :)

But hey, do as you like.

On the other topics I agree with Robert.

> Regards,
> Robert.
> On 05/05/07, Johannes Bergmeier <Johannes.Bergmeier at gmx.net> wrote:
> > on thursday i moved ksudoku from playground to kdereview.
> >
> > ksudoku is a sudoku game, which provides a puzzle generator and solver
> > and support for different variants of sudoku (like roxdoku, samurai and
> > jigsaw). it was invited to be part of kdegames and is now allmost
> > completely ported to KDE4.
> >
> > if you have suggestions on what parts needs to be improved or where our
> > team did mistakes i would love to receive comments.
> >
> > Josel
> >
> > --
> > Johannes Bergmeier
> > Johannes.Bergmeier at gmx.net
> > Jabber: joselb at jabber.org

More information about the kde-core-devel mailing list