Sign in to follow this  
miket

Map question

Recommended Posts

miket    122
Hello: I am hoping you guys can help me settle an argument I am having dealing with game maps. If you have a map were all the playing areas are different shapes and sizes, like risk for example, how are the graphics programmed in? My friend says that they load each different shaped and sized graphic in just like they do for a normal Hex type game. So you have a tile class and it holds the area graphic along with terrain information. I always thought the loaded one big graphic for the map then had an invisible field over it divided up into same size squares that are used for movement. Then these squares are what hold the information. SO in other words I guess your tile class wouldn’t point to a graphic Does anyone know the answer or we I can go to get one? Thanks

Share this post


Link to post
Share on other sites
Ainokea    435
The way it works is you would have tiles for grass, tiles for mountans, tiles for trees, tiles for characters, etc.. etc..

And in your map editor you place those diffrent tiles where you want them then you load the map into your game. The reason its not a bmp or gif or whatever is because you wouldnt know what tiles you can go on and what tiles you cant.

Share this post


Link to post
Share on other sites
EvilProgrammer    122
I'm pretty sure each tile points to it's own graphic, but a form of both approaches is used.

I think what many games do is use what are called "meta-tiles." The map is actually constructed out of many tiny tiles that have their own graphics, but the level artists place them down in large blocks, the meta-tiles.

Baldur's Gate I think it was had the artists make a huge picture of the entire map, which was then cut into tiles. I'm don't know, but even then I think each tile pointed to its own part of the graphic.

Share this post


Link to post
Share on other sites
miket    122
Ainokea
Yeah I understand loading of bitmaps but never really seen an example of a board where each tile in its self is a different shape and size.

EvilProgrammer:
Ok so what you saying is that they make the map out of lets say 200 tiniy tiles and each of the diffirent shaped board tiles is made up of these tiny ones?
I guess that makes sense but I hate to see the code to make sure all the right tiles fall into the correct big tile.

Thanks Guys

Share this post


Link to post
Share on other sites
EvilProgrammer    122
If you've ever used StarCraft's map editor you are already familiar with the metatiles concept. When you place those big blocks of terrain, those are metatiles. The actual tiles are much smaller.

Share this post


Link to post
Share on other sites
Riecon    122
I'v seen what you mean, a game called domminions did somthing simmilar.

It seemse to me what they did was took one large bitmap of the entier map. Then they used rectangles defined elsewhere so that when the player clicked on the correct portion of the map he would get information about that nation. It seems they then tied each nation to the others manualy in an array or somthing in memory so it could validate moves. Is this what you mean?

Share this post


Link to post
Share on other sites
Heaven    600
If I had to do something like a risk map, I'd make the world map one big picture. I'd have another picture the exact same size which I would never display, and I'd use a unique color for each country. Then, when the player clicked on the world map, I could tell which country he clicked on by checking the color underneath the mouse pointer.

I think the Medieval:Total War games use this method.

Take care.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this