Raymond Hill's Web site
Programming projects for fun
- Jigsaw Puzzle using HTML5 <canvas> tag
- Seventh iteration: Support of arbitrarily complex tessellations?
- Since a piece can now be a complex polygon (this was a requirement of making pieces snap with each other), this opens the door to create puzzle pieces of pretty much any shape. Performance will be the main limitation (points per polygon.)
- Currently working on Voronoi tessellations
- Sixth iteration (3-Jul-2009):
- Release notes:
- Now using HTML5 <audio> tag to render sound effects, no longer using Flash-based Sound Manager 2. Firefox 3.5 supports natively the HTML5 <audio> tag.
- Added persistence. One can now leave the jigsaw puzzle page and come back without losing its progress.
- This can also be used to exchange partially completed puzzle with others. (Example: Half-done puzzle)
- Try it:
- Small: [todo]
- Best on 1680×1050 monitors:
- Best on 1920×1200 monitors:
- Fifth iteration (29-Jun-2009): New web page (Open Social compatible)
- Rewrote the web page to be compatible with Open Social such that the jigsaw puzzle can be embedded on people's home page.
- Fourth iteration: Support of edge profiles
- Third iteration (9-Jun-2009):
- Release notes:
- Pieces now snap together rather than to the background (this required an ajacent-polygons merging algorithm)
- Now using HTML5 canvas' isPointInPath() to detect whether a point is inside/outside polygon, no longer need PNPOLY from W. Randolph Franklin
- Various improvements/rewrite
- TODO: for polygons with large hole(s) in it, uses polygon as clipping region (Working on it)
- Try it:
- Second iteration (4-Jun-2009):
- Release notes:
- Rotation of pieces added, this add a level of difficulty (configurable: puzzleRotate=number of steps per 360 degrees: 1=no rotation, 8=45 degrees/step, 30=12 degree/step, 90=4 degrees/step, etc.)
- Thumbnail preview added (with simulated shadow, I couldn't make the built-in shadow implementation work on Firefox, this needs investigation)
- Code rewrite toward OOP and efficiency (more left to do)
- Try it:
- First iteration (31-May-2009)
Other Interests