Thanks guys for the reply. Now I have a better understanding on how to achieve the effect. Currently i'm planning to provide vector puzzle pieces as mask templates first. Once that's done, I would try to start working on dynamically drawing the puzzle nubs and cutouts.. I like the review Neo handed. It explains a lot what Hans described... One question though, whether the sides are drawn by code or provided as vectors, how would you combine 4 of them to make it as a filled masked vector shape using drawing api?
One other thing, the puzzle I'm doing would allow users to move puzzle pieces and combine them by side references (like, piece A is always in the left of piece B, while D is always below A, for example). Now I've manage to make each piece move other pieces in one group as a whole (using onMouseMove for the dragger and onEnterFrame by calculating distance with the dragger for the 'dragee') but it seems unoptimized and often lags (which shifts pieces location) if you move the mouse fast. It would look unsticky. Does anyone have an idea for a better algorithm? thx, Guntur N. Sarwohadi PS. Neo, hows the TGB Isometric Add-On doing? :p On 7/11/06, neo binedell <[EMAIL PROTECTED]> wrote:
Try something like this http://www.cedesign.com/cefx/reviews/reviews1_avbros.html ~neo -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Guntur N. Sarwohadi Sent: 06 July 2006 03:15 AM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] jigsaw puzzle piece algorithm I'm working on a puzzle game in flash, much similar to jigsaw puzzles you see in gameHouse or such casual game publisher. I'm having a hard time trying to cut an image to make it as puzzle pieces in AS2. Currently I'm doing it the hard way, cloning bitmapData image, and masking portions of the image. Can you cut parts on an image using bitmapData methods? And does anyone know how to create the infamous jigsaw pattern to it as well? Many thanks, Guntur N. Sarwohadi _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com