Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the next two chapters, I'll introduce you to the world of tile-based games. Whether you've been playing games since the age of classic role-playing games like Ultima or you've just recently joined your Facebook friends in Farmville, I'm sure you've already played a game that uses the tilemap concept for displaying its graphics.
In tilemap games, the graphics consist of a small number of images, called tiles, that align with each other; placing them on a grid allows us to build rather convincing game worlds. The concept is very attractive because it conserves memory as compared to drawing the whole world as individual textures, while still allowing a lot of variety.
This chapter will introduce general tilemap concepts by using the simplest tilemaps of all: orthogonal tilemaps. They are most often built from square, rarely from nonsquare rectangular tiles, and typically display the world in a top-down fashion. I'll discuss the various display styles of tilemaps, and the next chapter will focus on isometric tilemaps, building on the tilemap programming basics that you'll learn in this chapter.