O'Reilly logo

Programming Wireless Devices with the Java™ 2 Platform, Micro Edition, Second Edition by Jim Holliday - Editor, Aleksi Uotila, Mark Patel, Jyri Huopaniemi, Jim Van Peursem, Antero Taivalsaari, Roger Riggs

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

12.4. TiledLayer

A TiledLayer is a Layer that is composed of a grid of cells that can be filled with a set of tile images. This technique is commonly used in 2D gaming platforms to create very large scrolling backgrounds without the need for an extremely large Image. The use of animated tiles allows numerous cells of a TiledLayer to be animated quickly and easily.

12.4.1. Tiles

As with a Sprite's frames, the tiles used to fill the TiledLayer's cells are provided in a single Image object which may be mutable or immutable. The Image is broken up into a series of equal-sized tiles whose dimensions are specified along with the Image.

Each tile is assigned a unique index number, as shown in Figure 12.7. The tile located in the upper-left corner of ...

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