2
\$\begingroup\$

When we talk of tiles, are we strictly talking about images or the underlying data structures?

For example, I read an article which explains that tiles are a data structure that holds your game data. Then I read this article which explains that tiles are images that fit together.

Which is correct? Should I infer that "tile-based games" use both systems concurrently?

\$\endgroup\$
  • \$\begingroup\$ when I use tiles for my games, they generally consist of a (warning - Python specific language) rect, which is a coordinate container, and an image to display, along with any other characteristics, such as if it is collideable. \$\endgroup\$ – Pip Dec 31 '13 at 15:31
2
\$\begingroup\$

You've over-thinking this. The answer to your question: "Which is correct?" is... Both.

There are a million different ways to structure a game which uses visual tiles and you're making a false assumption that there can be only one true way, but there's not.

The only uncontested description of what a tiled game is is that visually a tiled game is made up of... tiles. Bits and pieces stuck together in a regular grid to make maps, just like a bathroom floor and ceramic tiles.

Inside a game can be anything from old style RPGs (e.g. Chrono Trigger) where you hop from tile to tile to free roaming movement (e.g. Diablo).

\$\endgroup\$
6
\$\begingroup\$

There are no strict definitions. It's true that the term tiles can apply to both data structure and visual representation. When people say "Tiles", they are just breaking the game into a regular grid, either logically (data structure) or visually (tiled images).

It's probably more appropriate to only refer to tiles as the visual aspect (like real life tiles), and use the term grid to define the underlying data structure (like a mathematical structure).

Grids are commonly square or hexagon shaped and any tiles being used will likely be shaped to match.

\$\endgroup\$
1
\$\begingroup\$

From the gameplay point of view, a tile is the minimun unit of movement for a game object in lots of games.

E.g: You press left key, the player move one tile to the left.

\$\endgroup\$
  • 1
    \$\begingroup\$ I think it's more accurate to simply call that a "unit". Since many games that have tiles, don't restrict movement to them. \$\endgroup\$ – MichaelHouse Dec 31 '13 at 22:11
  • \$\begingroup\$ @Byte56, you're right. I mean, the tile is not only a graphical concept . But I didn't explain it enough :P \$\endgroup\$ – Zhen Jan 1 '14 at 20:21
0
\$\begingroup\$

"Tile" is a general definition for a grid item. Whether that grid represents a data object, image object, or something else is up to you.

\$\endgroup\$
  • \$\begingroup\$ Yes, but specifically for game development, how is it done? are tile based games written with tiles that contain both the game data and images? Or do game developers typically use two separate tile maps - one for game data and the other for images? Or does it depend on the type of game? For example, might a platformer use a tile map for images while an RPG used a tile map for data only? \$\endgroup\$ – James Dec 31 '13 at 14:51
  • \$\begingroup\$ FWIW my experiences with tiles comes from text based games, where a tile would be a "room", but that room might contain 10 items. So perhaps one data tile would map to 10 image tiles? \$\endgroup\$ – James Dec 31 '13 at 14:54
  • \$\begingroup\$ You can use tiles in any situation that you can think of. If your tile happens to consist of coordinates and a small image, go ahead. If you want your tile to have multiple items exist and the "top" item is show (ie dwarf fort), then feel free. Implementation is really up to what your requirements are. \$\endgroup\$ – user39686 Dec 31 '13 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.