Jigsaw Puzzle tutorial (Request)

0 favourites
  • 6 posts
From the Asset Store
An amazing and interesting puzzle game for kids!
  • I made a jigsaw puzzle with 3 levels of difficulty, easy, medium and hard.

    For the Medium level I used Arcalau's tutorials: https://www.scirra.com/tutorials/685/ma ... ne-concept

    But Arcalaus uses a mechanic that would be really annoying to use with another set of pieces. Apparently his method functions with his set of pieces only.

    And I wanted to create another levels with another numbers of pieces. I couldn't figure out a way of using the same method that Arcalaus uses, so...

    For the Easy level I used Alextro's example: animated-jigsaw-puzzle-sharing_t182600

    And I was very happy <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I also wanted a hard level, and this time I managed to use Alextro's template to create basically the same thing, but with more pieces. Problem is that Alextro uses a lot of layers (one for each piece), and it just drastically decreases the fps when using 120 pieces.

    So, my 3 levels are working, but the hard one, with 120 pieces and layers are very slow in fps <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    How would be a good method to create a jigsaw puzzle without using a layer for each piece as Alextro does? Or if it is reasonable, how to change Arcalaus mechanics to work with another set of pieces?

  • I think the reason why Alextro's example is slow with 120 pieces is not the layers, but the fact that each piece is actually a copy of full-size animation trimmed using blend mode.

    So yeah, this is not a very good method for big puzzles.

  • So yeah, this is not a very good method for big puzzles.

    This is an ephemism... Using blend to make each piece as a cropped version of the full pic is actually the worst way of doing this...

    You COULD use the blend method to give the shape if you apply it to smaller squares. But having 120 instances of the complete picture, each of them with a blend effect is a recipe to slowness...

  • If you don't want the pieces animated you could use the paster object to apply the blend once so that it's just a matter of drawing separate objects.

    https://www.dropbox.com/s/sdj85geci4y5g ... .capx?dl=1

    The only annoyance is the collision box of the generated pieces are bigger than the visual part of the piece. You could work around that by using a separate smaller square per piece and pin them together. Or if you wan to go crazy you could check is the tabs of the pieces are clicked as well. Could be tricky though and i foresee fighting with the dragndrop behavior with that.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you guys. Indeed no way of using Alextro's method!

    I'm trying your Paster plugin R0J0hound, it seens delicious. This maybe my savior. Thanks a lot : )

    I'll keep you informed.

  • Yes don't use my method, it will harm your device

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)