Contents
What is a tileset?
What are the advantages of using tilesets?
Example File
Resources

There are tutorials and examples on making fast loop level editors, etc around TDC. There's even level editors examples that use tilesets. This is not the focus of my article. My focus is the discussion of tilesets, their advantages and how easily they can be incorporated into your own level editor or game. An excellent article was written by cake some time ago (linked in the Resources section) which I thought I would elaborate on because it had great ideas/examples but didn't explain the Active Picture Object's use that well.

What is a tileset?

A tile set is collection of smaller images called tiles (typically of uniform size) which have been combined into a single larger image. Tile sets are often used in 2D video games to create complex maps from reusable tiles within the set. When a tile set based map is displayed, the tiles that are stored within it are used to reassemble the map for display. This technique is seen in games designed to run on portable systems such as Nintendo's Game Boy Advance system or a cellular phone ... Using tile sets reduces the amount of system memory required to display maps since it allows for the same tiles to be reused multiple times in a map. It also reduces amount of artwork needed for individual maps since many different ones can be created from the same tileset. In order for maps made from tile sets to appear more distinctive, games typically display them with a different tile set for each unique environment.

(From http://en.wikipedia.org/wiki/Tile_set)

Example of a tileset. (Taken from Gamespot.com through Google Images, I don't know it's original source/where it's from.)
Image
http://ui09.gamespot.com/520/tiles_2.jpg

What are the advantages of using tilesets?

Image

I made this tileset myself a few years ago, and that's all well and good but I had no idea how to implement it into a game as just the sheet image, so I would use a graphics editing program to cut out each tile and create a new backdrop or active object for every tile that I had made. Simple enough, right? Yes, easy, but that's only if you have around 10 unique tiles that you use. Suppose you are creating a massively complicated map with your own level editor using each tile as an active object to paste on to the level and you have 100 unique tiles, maybe even 200. That means cutting out each tile, pasting and cropping it in MMF, which would get extremely tedious and boring, not to mention you may need a unique event for each tile to place it.

Image

You would be wasting precious time you could be spending actually creating beautiful levels and scenery!

There's many reasons that tile sets are an advantage for your game:

Game mechanics - Many games actually run on a grid-based system, be it RPG, strategy, board game, anything really. Even if your game doesn't run off a grid, it is useful to be able to reuse tiles in a map to create a large playfield. The more tiles you use, the less grid-like you can make the game appear.
Save time - with an image that contains many tiles, you will not need to cut out each one individually or create a new object for every tile you use.
Save memory and filesize - It's only logical to assume that by using one single image, you can save yourself from creating an MMF frame with 100 unique objects that clutter the field, your object list, will increase your filesize and slow your game down eventually.
Save events - Using a single tileset image will save you events as you can use simple calculations to make a level editor know which tile it is using without specifically naming each one and making an event to place it. (Refer to cake's article)
Save editing pain - Oh dear, you just realised that tile doesn't mesh with it's surrounding tiles, or the colours aren't right for these 50 tiles. Save yourself the horror and simply edit the tile set sheet.
Customization - Using tile sets, it is your choice to allow players to create their own truly customized levels in your editor, and opening many more possibilities. Not just in environment, but HUD/GUI graphics too!
Take the next step - If you aren't already using tiles, or are using them in a tedious manner, take your game creation to the next step by using something that is universal to all gaming programming/languages - tile sets!

So let's look at a simple way to get started.

Example File

I've made an example file for your download at this location:

TilesetBasedEditor.zip - 13.25KB
http://www.mediafire.com/download.php?gdymiooiotw

And I will now run through it (with images) to explain how easily you can use the Active Picture Object to implement tilesets. I recommend looking at this example .MFA file, but if you don't need it, I've outlined pretty much everything here too.

Your most important thing: the Active Picture Object.
When you place it on your frame, you will be given this dialogue.

Image
Select your tile set. Transparent colour can be set in the properties frame in MMF.

Image

Now for the important part - the events. Using just two events, we can create a very simple copy/paste from the Active Picture Object, using it's action Create Backdrop Object.

Image

Any problems you might have with it not copying and pasting from/to the right places, you will need to double check if you have the right uniform size tiles, any offsets to consider and remember that tile sets are made to be compressed to save size - put your tiles directly next to eachother, don't be afraid because you can easily cut them out again using this method or in your graphics editing program show a grid for your tile sizes to see where each tile begins/ends if you get confused. I hope that the images and example have spelt it out for you fairly well - and remember, the size is not limited to 16 pixel tiles. This is your choice, though numbers in the power of 2 are standard sizes (16, 32, 64, 128, 256, 512 .. etc) used for all sorts of things.

And this is just the beginning, once you understand how easy it is to do this, you can incorporate this method into your level editor, using arrays (or INIs) and fast loops to create a functional, powerful editor which allows for great customization in your game and isn't just the player's benefit, it makes your game creation more streamlined and is a useful tool. (Just look back at the advantages of using tile sets!) Remember that this is for backdrops also, active objects will still need to be handled in the usual manner, but this allows for more time doing those rather than wasting time cutting out tiles and assembling them individually on your frame.

Resources

Generating Levels from external data - Article by cake
http://www.create-games.com/article.asp?id=1262
WikiPedia page on Tile set
From http://en.wikipedia.org/wiki/Tile_set
Found example of a tile set
http://ui09.gamespot.com/520/tiles_2.jpg
Mr. Map Maker (Full) (v2.4)
http://www.create-games.com/download.asp?id=7422
Tile Widget
http://www.create-games.com/download.asp?id=7417
Zephni's level editor tutorial
http://www.create-games.com/download.asp?id=7727
Adventures of Pause opensource level editor
http://www.create-games.com/download.asp?id=7744
Tile Based Games - Article exploring more in depth about tiles.
http://www.create-games.com/article.asp?id=1869