Making a jigsaw puzzle
The things we have tried so far in this chapter use techniques that would be useful in any LiveCode
application, not specifically with mobile applications. You can try the stack you have constructed; it will work well on a mobile device, even with the color picker, states map, and 20 cars driving around the screen! But those tests didn't really make use of any mobile features. The remainder of the chapter will build on the information about imageData
, and will also take advantage of a few mobile device features.
Going to pieces…
The general technique we're going to use is to take a set of PNGs that have a nice alpha channel in them (that creates the puzzle piece edges), and then replace the actual pixel data with an image of our own. The first thing we need then is some PNGs.
If you make a commercial mobile application, either create your own puzzle shapes or buy a royalty free image. For prototyping you could grab any image from the web, and get the basics going, then...