Palapeli: Pieces drop shadows

October 1, 2009

Because of Friedrich’s continued poking, I’ve looked into solutions for the “let pieces drop shadows” problem. Here is a first proof of concept:

New shadows and jigsaw pieces in Palapeli

New shadows and jigsaw pieces in Palapeli

I’ve decided against generating the shadows together with the puzzle, and saving them in the puzzle file, because this would have doubled the size of the puzzle files (which are already bigger than I wanted them to be). Unfortunately, the current algorithm needs about 4 seconds to render the shadows for the biggest puzzle of the current standard library (“European Honey Bee”, size of source image is 1620×1280). I have therefore decided to not enable shadows by default (they can be enabled in the config dialog) until the rendering performance for the shadows has been improved drastically.

Update 2: I’ve speed up shadow rendering by 75%. Shadow rendering is now enabled by default.

Also on above screenshot, you see the new jigsaw slicer in action. The previous slicer used a set of seven hand-drawn plug shapes, while the new one can generate millions of different plug shapes from random parameters.

Update 1: The ugly lines between connected pieces, which you can see in the above screenshot, are now gone in the development version.

Advertisements

16 Responses to “Palapeli: Pieces drop shadows”

  1. frinring Says:

    Nice! Thank you for really adding the shadows, I think it looks now even better 🙂 And congrats for all the progress with Palapeli.

    Now I am waiting for Multitouch support 😛

  2. Sebastián Benítez Says:

    How about applying emboss to the pieces to give them that 3d look the real ones have?

  3. shamaz Says:

    indeed, it looks good 🙂

  4. KlavKalashj Says:

    I love it!

  5. Fattazzo Says:

    Nice!!
    I like your job!!
    I am a Kubuntu user, there is a way to try it?

    Sorry for my english 🙂

    • Stefan Majewsky Says:

      I’m not aware of any packages of my development version (there are packages of the versions 0.1-0.3 somewhere, but these are totally outdated). You’ll need to build Palapeli from the source. At the top right of this page, you find a link with instructions for “How to obtain a current Palapeli”.

  6. maninalift Says:

    If the speed issues are sorted out , it might look good if grabbing a piece resulted in the piece shifting slightly but the shadow staying in the same place so as to give the impression of the piece being picked up.

  7. Christoph Says:

    Install/Build palapeli:
    I have a problem following the instructions at https://majewsky.wordpress.com/how-to-obtain-and-build-a-current-version-of-palapeli/:
    In step 3, after “bash make-puzzles.sh”, “cd ../build” doesn’t work (no such file or directoy). If I do “cd ../../build” for that command instead and launch palapeli at the end, I get a “no puzzles found in the library” information dialog.
    So I can’t really use palapeli because I didn’t see anything for “importing” puzzles.

    By the way, I have a suggestion: How about a “create a new puzzle” thingy: The user selects an image from the hard drive and specifies the number of pieces (and the size). and then a new puzzle is created.

    • Stefan Majewsky Says:

      Import/export from the library, and creating new puzzles are on my todolist, I just did not get around to reimplementing them (they were already available in the old Palapeli).

      Concerning your build problems: The missing “../” on the instructions list is fixed now. Did the run of “make-puzzles.sh” produce *.pala files in the puzzles directory? If yes, does “sudo make install” mention that it installs them? (If it does install them, the last five lines of the output of “make install” should tell you where the puzzles have been installed.) If the puzzles are installed correctly, please tell me what output the following command produces for you:

      kde4-config –path data –locate palapeli/puzzlelibrary/citrus-fruits.pala

      • Christoph Says:

        Thanks for answering!
        *.pala files are created, but they are not installed in the “sudo make install” that I should run afterwards. I just get

        $ sudo make install
        [ 0%] Built target pala_automoc
        [ 12%] Built target pala
        [ 12%] Built target palapeli_jigsawslicer_automoc
        [ 19%] Built target palapeli_jigsawslicer
        [ 19%] Built target palapeli_rectslicer_automoc
        [ 25%] Built target palapeli_rectslicer
        [ 25%] Built target libpala-puzzlebuilder_automoc
        [ 32%] Built target libpala-puzzlebuilder
        [ 32%] Built target palapeli_automoc
        [100%] Built target palapeli
        Install the project…
        — Install configuration: “RelWithDebInfo”
        — Up-to-date: /usr/local/lib/libpala.so.0.1.0
        — Up-to-date: /usr/local/lib/libpala.so.0
        — Up-to-date: /usr/local/lib/libpala.so
        — Up-to-date: /usr/local/include/libpala/libpalamacros.h
        — Up-to-date: /usr/local/include/libpala/slicer.h
        — Up-to-date: /usr/local/include/libpala/slicerjob.h
        — Up-to-date: /usr/local/include/libpala/slicerproperty.h
        — Up-to-date: /usr/local/include/Pala/Slicer
        — Up-to-date: /usr/local/include/Pala/SlicerJob
        — Up-to-date: /usr/local/include/Pala/SlicerProperty
        — Up-to-date: /usr/local/share/kde4/servicetypes/libpala-slicerplugin.desktop
        — Up-to-date: /usr/local/share/apps/cmake/modules/FindLibPala.cmake
        — Up-to-date: /usr/local/lib/kde4/palapeli_rectslicer.so
        — Up-to-date: /usr/local/lib/kde4/palapeli_jigsawslicer.so
        — Up-to-date: /usr/local/share/kde4/services/palapeli_rectslicer.desktop
        — Up-to-date: /usr/local/share/kde4/services/palapeli_jigsawslicer.desktop
        — Up-to-date: /usr/local/bin/libpala-puzzlebuilder
        — Up-to-date: /usr/local/bin/palapeli
        — Up-to-date: /usr/local/share/apps/palapeli/palapeliui.rc
        — Up-to-date: /usr/local/share/apps/palapeli/palapeli-libraryui.rc
        — Up-to-date: /usr/local/share/apps/palapeli/palapeli-puzzletableui.rc
        — Up-to-date: /usr/local/share/applications/kde4/palapeli.desktop
        — Up-to-date: /usr/local/share/apps/palapeli/backgrounds/background.svg
        — Up-to-date: /usr/local/share/apps/palapeli/backgrounds/Eliminator-Funk-2.jpg
        — Up-to-date: /usr/local/share/apps/palapeli/backgrounds/gon-defends-the-critters-1.jpg
        — Up-to-date: /usr/local/share/apps/palapeli/backgrounds/mahogany-handjob-1.jpg
        — Up-to-date: /usr/local/share/apps/palapeli/backgrounds/Rear-Admiral-Diplomat-1.jpg
        — Up-to-date: /usr/local/share/apps/palapeli/backgrounds/Time-For-Lunch-2.jpg

        The output of kde4-config –path data –locate palapeli/puzzlelibrary/citrus-fruits.pala
        is

        $ kde4-config –path data –locate palapeli/puzzlelibrary/citrus-fruits.pala
        kde4-config: Unexpected argument ‘–path’.
        kde4-config: Use –help to get a list of available command line options.

        If I start palapeli, I still get the same “no puzzles” warning.

      • Stefan Majewsky Says:

        The parameters to kde4-config need two dashes (like I wrote).

        About “sudo make install” not installing the puzzles: Now that is strange. Try to rerun cmake in your build directory. If “sudo make install” still refuses to install the puzzles, clear the build directory (i.e., delete everything in it) and do the “cmake/make/make install” stuff again.

      • Christoph Says:

        Thanks, it works now!
        Doing “cmake ..” from the build directory and running “sudo make install” again did the trick.

  8. DanaKil Says:

    well, you made me compile libkdegames for the first time because I wanted to try Palapeli and I loved it 🙂

  9. Fattazzo Says:

    I try to build myself but i am very newbie 🙂

    Someone could help me with a .deb file? 🙂 ( If it’s possible )

    Thanks


    • Xavier Vello (one of the Debian packagers) is working on a package of the current Palapeli development version. (I do not know where the packages will exactly land, I’m an openSUSE user and therefore not very involved in Debian packaging.)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s