Jigsaw Puzzle tutorial (Request)

Get help using Construct 2

Post » Thu Oct 26, 2017 8:19 pm

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 :)
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 :(
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?
B
28
S
14
G
6
Posts: 90
Reputation: 5,492

Post » Fri Oct 27, 2017 2:59 am

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.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,747
Reputation: 67,315

Post » Fri Oct 27, 2017 7:35 pm

dop2000 wrote: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...
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 717
Reputation: 3,996

Post » Sat Oct 28, 2017 5:36 pm

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.
B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

Post » Sun Oct 29, 2017 3:55 pm

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.
B
28
S
14
G
6
Posts: 90
Reputation: 5,492

Post » Mon Oct 30, 2017 8:19 am

Yes don't use my method, it will harm your device ;)
ImageImage
B
122
S
53
G
24
Posts: 794
Reputation: 23,917


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests