Tiled Sprite object

A tiled sprite object allows us to display an image in a tile set. You can increase and decrease the size of the tile set by scaling the object in the scene.

A tiled sprite object can be used to create platforms in a platform game. It can also be used as a group of the same images. In this case, there is no need to deal with multiple sprite objects.

Add a tiled sprite object

To add a Tiled Sprite object to a Scene, create a new object from the Objects list. Select the “Tiled Sprite” option from the panel that opens.

Open object properties

Next, again from the Objects list on your right, open the object's properties by right clicking on the object. Select “Edit object” from the popup list that appears.

Add an image

To add an image to the object, click the “Select an image” field. A local file browser will open on your computer. Choose an image of your choice.

The selected image will be displayed in the preview window on the right

Change default size

We can change the default size of the tiled sprite object by changing the Default width and Default height value on the bottom

The default size effects how much of our image is going to be visible in the object. For example this is how my image looks with an object size 32×32.

As you can see the above image does not scale along with the object but makes the image only partially visible.

If I set the size of the object to 100×100 (as seen below), object size is bigger than the actual image so it continues drawing the image again to fill the empty space.

Scale the object

You can get instant results by scaling the object in the scene editor to create the look/size that you need.

The Scene (Events) editor can also be used to change the size of a tiled sprite. Using the Events editor makes gameplay more fluid and interesting.

Examples

See it in action! 🎮
Open these examples online.