Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Game Programming By Example

You're reading from   Python Game Programming By Example A pragmatic guide for developing your own games with Python

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781785281532
Length 230 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Tile maps


The technique of tile maps became a successful approach to storing large amounts of information about game worlds with small, reusable pieces of graphics. In 2D games, tile maps are represented by a two-dimensional matrix that references to a tile object. This object contains the required data about each cell of the terrain.

The initial sheet used by the tile map contains the "building blocks" of our scenario, and it looks like what is shown in the following screenshot:

Starting from this simple image, we can build a grid map in which each cell is one of the squares the sheet is divided into.

Tiled Map Editor

We will use Tiled Map Editor, a useful tool for manipulating tiled maps. It can be downloaded for free from http://www.mapeditor.org/, and it can be run on most operating systems, including Windows and Mac OS.

This software is also well-suited for level design, since you can edit and visualize the resulting world in a simple way.

Once we have installed and launched the program,...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime