O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TiledLayer

In the lines associated with comment #2.2, a try block is implemented to contain the definition of an object of the TiledLayer type. Definition of this object proceeds along lines similar to those used to define a Sprite object. You begin by calling the createImage() method to load the source file data into the Image object (background). Figure 14.6 shows a vastly enlarged view of the graphical file used for this purpose. The size of the image is 16 pixels high and 64 pixels long.

Figure 14.6. You create an image file that you can use to create cells for a TiledLayer object.

As mentioned in Table 14.3, the TiledLayer object takes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required