THIS IS ANSWERED NOW 🙂
I’m building a jigsaw game, I have no problem with programming it if the images are cut with photoshop, no problem..
today, I have an image taken by camera
I want to slice this image into jigsaw pieces dynamically, inside the corona script.
can corona masking
feature do this?
I want to have these pieces as separate objects
, can I do this with corona SDK? How?
Thanks a lot.
2
Answers
answer:
yes masks are enough and it's easy, it worked very nice!
Code
arbitrary mask I created
Result
I think the easiest method would be to generate masks for each puzzle and simply generate X instances of image and mask each one with another mask. You may add a
object.id
orobject.column
andobject.row
to determine their index or position.Here’s a masking tutorial for you:
https://docs.coronalabs.com/daily/guide/media/imageMask/index.html