Jigsaw Puzzle

I created the very basic engine back in 2007. That was only to make the puzzle pieces from an image. But never really felt like completing the game (I’m too lazy)! Anyway, I decided to have a go at it and following is the result of my past couple of days’ work. There’s a lot to be done/ fixed though. The puzzle pieces are generated programmatically. There are no fixed/ static masks/ shapes. So there’s actually no limitation of the image size. And the images can be broken into any number of pieces. The larger the image and the more the puzzle pieces, the higher the pieces generation time. Currently I used a 400×400 image and broke it into 64 (8×8) pieces.
Of course, there are some scope of optimization in the code. But all I wanted is getting a playable demo ready in as little time as possible. And the end result is not quite bad I guess ;)

Anyway, the to-dos are:
1. Allow uploading custom image
2. Logging player scores

(Click to launch the demo)

Image Hosted by ImageShack.us

Posted: May 4th, 2009
at 9:08pm by Kayes

Tagged with , , , ,


Categories: Games

Comments: 7 comments



 

7 Responses to 'Jigsaw Puzzle'

Subscribe to comments with RSS or TrackBack to 'Jigsaw Puzzle'.

  1. Nice work!

    I’d suggest you add a grid to the background as a visual guide for placing the pieces and add ’snapping’ to the drag & drop mechanism.

    anggie

    5 May 09 at 7:47 am

     

  2. Thanks for suggestion Anggie. Did you mean to say that whenever a player moves a piece to an adjacent piece the two would snap together with the player holding the mouse down?

    Kayes

    5 May 09 at 12:38 pm

     

  3. Dider bhi, i need you urgently. please help me. Here is my cell.

    Alimul

    1 Jun 09 at 10:10 am

     

  4. hi… i was searching this game in flex … now only i got it… could you please give me the source of this jigsaw game… i need it very urgent…
    help me…

    Amutha

    7 Oct 09 at 10:58 am

     

  5. how to cut the image like jigsaw shape

    amutha

    28 Oct 09 at 5:04 pm

     

  6. Hi Raju! The trick is masking. I first splitted the image into several pieces and set mask to each piece. Suppose my image is 300×300. So if my piece size is 30×30 I have 100 splits. Then I set the mask to each piece.

    To achieve tessellation, a piece might have parts of its immediate surrounding pieces (the ones next to its North, South, East and West). Therefore actually a piece size will never be exactly 30×30 because of tessellation and interlocking features. I hope you got my point.

    You could use static shape as mask. But I wrote an engine to build the jigsaw shape programmatically and designed the game such a way so that anyone can write an engine to build different shapes and easily plug that to the game.

    Kayes

    28 Oct 09 at 7:59 pm

     

  7. k… i done the image spiliting in flex 3 using object handler, in that i read that splitted image as a bit map , inside the bit map i can draw only rectangle shape…so i was splitted the image in rectangle pieces…this was i done now… but i want to do it in jigsaw shape….i hope , you understood my problem clearly… could you please give any solution to my problem….

    amutha

    29 Oct 09 at 1:18 pm

     


 

Leave a Reply