[Kde-games-devel] Review Request 115946: Palapeli 2.0 - Support for solving large puzzles

Ian Wadham iandw.au at gmail.com
Sun Feb 23 21:15:40 UTC 2014



> On Feb. 22, 2014, 11:46 a.m., Stefan Majewsky wrote:
> > I just built master and gave it a very quick try.
> > 
> > So I found the new "Move" menu and created a holder, and the first thing that puzzled me (pun not intended) was how to move pieces into the holder. I figured that maybe I could learn the new mouse shortcuts from the configuration dialog, but I found that "Teleport pieces to or from a holder" had no shortcut assigned. Maybe a KConfigUpdate script is in order here to ensure that everyone has whatever the default shortcut is for that one?
> > 
> > After I assigned middle-click to that action, I succeeded to move some pieces to the holder. It was nice how the pieces were arranged in the holder, but I found it awkward that I could not work with the pieces (i.e. combine stuff) while in the holder.
> > 
> > So I tried to get them out of the holder again, but I failed. I tried to middle-click, but it says I cannot do that without another holder. It seems to want to move the pieces to another holder, instead of putting it back on the table.
> > 
> > Overall first impression: The additions look very useful, but I would appreciate some more guidance on how to use it effectively.
> > 
> > Another thing: Inside the holder, you can zoom out far beyond the extent of the shaded constraints. The main puzzle table has some limitation to how far you can zoom out, this would probably be nice for the holders, too.
> 
> Stefan Majewsky wrote:
>     Oh, another thing: The first page of the configuration dialog looks a bit overcrowded now. At the very least, you should consider splitting the spacing options from "Puzzle table" into a new group box ("Piece arrangement")?
>     
>     In fact, it might be useful to split the first page into two pages, one for appearance (the color and background options from "Puzzle table", plus the "Piece appearance" groupbox) and one for gameplay.
> 
> Ian Wadham wrote:
>     Thanks very much for taking the time, Stefan. I know you are busy these days.
>     
>     I do not really understand why you did not see the two new mouse-button assignments for Teleport and fast zoom in/out. I coded them as new entries "TeleportPiece" and "ToggleCloseUp" in triggermapper.cpp and new classes in interactors.cpp, then they just appeared automagically in the settings dialog. AFAICS the Mouse Interactions settings-page is dynamically generated by Palapeli from strings in triggermapper.cpp and interactors.cpp, not by .ui and .kcfg, but maybe I am missing something...
>     
>     The default mouse-click for Teleport should be Shift Left-Click, with Middle-Click for switching to close-up or distant view (this is a version of the magnifier feature we talked about years ago). Teleport is controlled (mainly) as in the starship Enterprise, i.e. from the *ship* (the puzzle table in this case). Shift-click on pieces in the puzzle table to put them in the selected holder (outlined in blue): shift-click on empty space on the puzzle table (or in a different holder) to get them out.
>     
>     You *can* combine pieces inside the holder. It is a descendant of Palapeli::View and uses a Palapeli::Scene. Your design of those classes proved extremely useful :-) Probably the easiest way to proceed would be to Maximize the holder and then use it like a normal Palapeli puzzle table for a while, but lacking the zoom-widget and slider (which applies only to the main puzzle table so far), but scroll-wheel and toggle close-up work in a holder.
>     
>     Re guidance, there will be material on large-puzzle aids in the Palapeli Handbook, deadline for KDE 4.13 is 15 March.
>     
>     ATM zooming and scale-control are not working properly in the holders. To be fixed in the next few days... Teleporting already-joined pieces works, but they go to unpredictable spots in the receiving window. That is also to be fixed very soon.
>     
>     I will have a look at re-working the settings dialog, but I am not at all comfortable with Qt Designer and there is a message freeze coming up in three days time. Perhaps in KDE 4.14?
> 
> Stefan Majewsky wrote:
>     Both assignments are there, but the default values have not been set. The problem is in Palapeli::TriggerMapper::readSettings(): If it finds *some* mouse associations, it assumes that everything is there and does not check the default associations for new actions.
>     
>     That's why I suggested you use a KConfig update script; to update existing configuration files to include the new default associations for the added triggers. A quick search turned up this doc, in case you aren't familiar with the kconf_update mechanism: http://techbase.kde.org/Development/Tutorials/Updating_KConfig_Files

The attached patch to Palapeli::TriggerMapper::readSettings() seems to fix the problem. Anything that has a default gets into the settings, even if it is new. If it does not have a default, it can only get in via user settings, as with viewport scrolling and locking the puzzle table. In time (i.e. if OK is pressed in the dialog sometime) the new settings and default values appear in the palapelirc file.

I have tested all these cases.


- Ian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115946/#review50514
-----------------------------------------------------------


On Feb. 22, 2014, 1:25 a.m., Ian Wadham wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115946/
> -----------------------------------------------------------
> 
> (Updated Feb. 22, 2014, 1:25 a.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: palapeli
> 
> 
> Description
> -------
> 
> This is NOT a code review.
> 
> Rather it is a review of how the new Palapeli works, from a user's point of view, when you are solving a large puzzle (300 to 10,000 pieces). Any suggestions for improvement of the way features work are very welcome.
> 
> The complete list of new features is at http://techbase.kde.org/Schedules/KDE4/4.13_Feature_Plan#kdegames and most of them have been pushed to origin master, in preparation for the upcoming freezes of KDE 4.13. You are welcome to review the code on origin master if you wish.
> 
> I would appreciate it if people could build the code and just try it out on a large, but not too difficult puzzle, say 300 to 500 pieces.
> 
> To support solving large puzzles there are some items in the new Move and View menus and some new settings in both Settings dialog pages.
> 
> Notably, there are two new mouse-button operations: "Teleport pieces to or from a holder" (default Shift Left-Click) and "Switch to close-up or distant view" (default Middle-Click). The first works by selecting a holder (click on it, if it does not already have a blue frame), then Shift Left-Click on pieces to teleport them from the puzzle table to the holder. You can also select multiple pieces (e.g. edges) and transfer them all together. To teleport pieces back from a holder, select them inside the holder, then Shift Left-Click an empty spot on the puzzle table. You can also teleport pieces from one holder to another (select in the source, Shift Left-Click in the destination). Teleported pieces are still selected when they arrive, so it is easy to reverse the operation (e.g. if you pick the wrong holder).
> 
> The close-up/distant zoom operation is now a mouse button (not a keystroke), so that you can point to the exact spot in which you are interested. To search the puzzle-table systematically for pieces to sort into holders, I recommend zooming to close-up on a corner of the table, then clicking on the empty spaces in the scroll bars to step through the puzzle table a "page" at a time.
> 
> 
> Diffs
> -----
> 
> 
> Diff: https://git.reviewboard.kde.org/r/115946/diff/
> 
> 
> Testing
> -------
> 
> Lots of testing, with puzzles ranging from 8 to 10,000 pieces, but mainly with the same picture at 24 and 510 pieces.
> 
> There is still some tuning and fixing to be done. Mainly sizing, positioning and scaling piece holders nicely when they are created and used; also enabling/disabling of actions as you switch between the collection and puzzle views.
> 
> 
> Thanks,
> 
> Ian Wadham
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20140223/052c1e77/attachment.html>


More information about the kde-games-devel mailing list