Tile based maps

Started by
10 comments, last by mjfara 13 years, 9 months ago
I'm having great difficulty wrapping my head around this.

When doing the art for the tileset, should I be making individual tiles?
Or should I make the scene as a whole, then divide it into tiles?

If I'm supposed to do individual tiles, thats a hell of alot of tedius graphics to make for when different tiles meet eachother.

If I'm supposed to do the scene as a whole, it defeats the purpose of making it tile based (saving memory).

Unless I do the scene as a whole, check each tile for duplicates (through binary comparison), and only use the one tile when rendering the map?

Any help is greatly appreciated, thank you.
Advertisement
Quote:When doing the art for the tileset, should I be making individual tiles?
Generally, yes.
Quote:Or should I make the scene as a whole, then divide it into tiles?
Generally, no.
Quote:If I'm supposed to do individual tiles, thats a hell of alot of tedius graphics to make for when different tiles meet eachother.
Yes, making graphics can be a lot of work. I think there are techniques you can use though to help with the 'meeting tiles' part (such as using alpha-keyed overlays to blend neighboring tiles together). This should cut down considerably on the amount of art that has to be created and stored in memory.
Quote:If I'm supposed to do the scene as a whole, it defeats the purpose of making it tile based (saving memory).
Yeah, pretty much.
Quote:Unless I do the scene as a whole, check each tile for duplicates (through binary comparison), and only use the one tile when rendering the map?
That's an interesting idea, but unless you (in one way or another) use tiles from the get-go, I think it'd be unlikely that you'd have areas that were exact duplicates of one another (unless the map is fairly simple and incorporates a lot of patterns or single-color areas).
Thanks for the response.

If that's the case, that is ridiculous!

Are there any alternatives to such tedious work?
It just seems crazy to sit there and make every possible tile, and then go and form a puzzle with all these tiles (making the actual map).

My confidence is slowly dying...

=(
Whether you should create the scene then cut it into tiles, or just make tiles and use some tricks to make them fit together visually depends IMO on what you want your scenes to look like. If you're reusing the same scene elements over and over in different parts of your game world, it makes sense to create your art in terms of tiles instead of scenes. If your scenes are unique, but you want to use a tile system for movement or whatever, drawing the scene (perhaps using a tile outline overlay so that you can make things like up nicely) is going to look way nicer IMO.

The latter "scene" approach is not terribly common, but it is used. For whatever reason, graphically, the Inifinity Engine games from Bioware actually use tiles "under the hood" even though the each scene appears to be one giant unique image.
If I were to create my level as one giant scene, how would I handle collision detection? I figured if I was going with tiles, I would be able to set which tiles you are able to walk on, and which you are not.

What if I made the map as one scene, broke it up into tiles, made an editor that lets you choose which tiles are solid and which aren't, and then saves it as a tile based map.

Would this work?

How is everyone else doing this?
Quote:It just seems crazy to sit there and make every possible tile, and then go and form a puzzle with all these tiles (making the actual map).
Hm, well, I'm not sure what your concern is exactly. Many, many games have been made using exactly the technique you described above (IINM, at least). Why does that sound unworkable to you?

The difficulty of it really depends on a lot of factors, but if you have a decent artist (or low standards for your art :) and an editor of some sort, I don't see why it would be so difficult. A simple game might only have a few tile types (maybe a few 10s of tiles) and not worry about blending where tiles meet. If you then have a decent editor where you can select tile types and place them in the map, creating maps should be quite easy.

Now, if you have something more complex in mind - say, many different high-quality tiles with blending - then sure, that'll take some work. But, making games takes work, and generating the content is a big part of that. (Do you think the great art in your favorite AAA game just happened? Nope - most likely, a whole team of people spent countless hours creating and refining it :)

[Edited by - jyk on July 9, 2010 5:25:24 PM]
Well put.
Maybe I am mixing terrain with other things such as buildings.
I guess these wouldn't be created tile by tile, but rather as a whole on a grid making up those tiles.
Do you find anything wrong with the method I proposed above?
It seems I can get much nicer graphics that way using photoshop and illustrator for all the art.
I made a simple 1080p landscape with grass and water and it came up to 4mb, not sure if that's overkill or not:...
Tiled graphics can look very tiled and you are seeing some of the problems associated with making tiled graphics look good (for instance making tiles that merge well from one tile to the other where the borders are).

One thing that can help make tiled maps look organic and nice is something called "wang tiling" you might give it a google (:

Oh and something else that might help you is using LAYERS. Instead of having one layer of tiles and having to make dirt tiles with trees, dirt tiles without trees, dirt tiles with fence, etc you can make a dirt tile, then layer a tree on top or a fence or a rock.

That makes the permutations of tiles you have to make a lot less
The reason for tile based games in the past was tile based hardware. And they didn't 'painstakingly draw every single tile' as you put it. They drew the few tiles that were needed, and the game world was made up of just of those tiles. You didn't draw up a huge landscape and then break it up into tiles, you drew one or more repeatable, seamless tiles, and made up the landscape out of just those.

The sprite hardware loaded up a small tileset into memory, and then drew up the world as a repeating series of those tiles. You can see this in a lot of early NES games, but eventually artists learned to make better tiles that hid it so it wasn't as noticeable.

On newer consoles, we even got games that had layers of tiles.

Even though we don't use sprite hardware anymore, it's still a valid way to make your game's graphics, and it's especially easy on collision if you keep it with the tile boundaries.

16x16 tiles go a long way. Plan what you want, and then figure out what tiles you'd need.
I think it really depends on the kind of game you are making.

Tiles can duplicate behavior as well as looks. If all you are checking for is walkable/not then I don't think you need tiles. Just have an black and white image where black = not walkable, white = walkable.

If you want to be able to interact with the terrain then tiles might be useful. Or if you want to make a random map.

For what I am trying to do, I don't want to have to deal with fringe tiles, so I use a grid of smoothly colored squares. Each point looks up its color depending on its attributes (climate and elevation). Then I put a tile on top of that (like a hill or mountain), but the tiles don't actually touch each other.

It sounds like you really want to do a separate image for each level/area. If space is a problem just cut it up and load/unload areas as needed. If you don't need to use tiles, then don't.

This topic is closed to new replies.

Advertisement