Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing a tactical game (X-Com / Fallout style) for fun. I've decided to use a hexagonal map, but I'm having a graphic problem.

My current map display is HUD-like, with only the border of the map cells displayed, without any texture. it's simple and allow for display of different types of informations by varying the color of the border. For exemple the "danger view mode" displays the borders with a color going from green (no damage possible) to red (prob of damage > 90%).

Now, It's a bit hard to differentiate the kind of tile the player is on. I could put a plain color (green is grass, pale blue is water...), but this is going to limit the possibilities. Thus, i would like to display a texture on my tiles. Since the map are generated, i can not use a picture for the whole map with the HUD over.

So, my question is : does any one knows how i could generate the sealess hexagonal textures (algo or plugin), or if there is a site with some hexagonal tiles ?

share|improve this question
The site's design inspires such questions :D – Oleh Prypin Nov 12 '10 at 21:11
up vote 1 down vote accepted

Can't you just do a planar projection of a regular tiling texture onto your tiles and just have hard edges where your tile types switch? So on your hexes that are "grass" just map their UVs in "map space" to a repeating grass texture.

share|improve this answer
i didnt know how to map the grass texture on an hexagon, and stupidly rejected the solution. After a little bit of thinking, I found how to do a triangle strip with (i think) a good UV mapping. Will try this evening. Thanks – PATRY Nov 12 '10 at 15:24
i still get a few quirk on my mapped hexagon, but its works. thanks again – PATRY Nov 15 '10 at 0:49
@PATRY I strongly suggest Cocos2d. They've saved me a TON of dev work. – Stephen Furlani Nov 15 '10 at 17:09

Take an ordinary texture and chop it up to make your hexagonal tiles.

To clarify: Take a seamless texture that's square. Use appropriate bits of it to make your hexagons. If you select your pieces appropriately you get a seamless texture on your hexagons. Note that each hexagon gets a different piece of the underlying texture up until the point the pattern repeats.

share|improve this answer
but then they won't be seamles, no ? (that's one of the solution i used in the end, but it worked well if i added the bondaries of the hexes) – PATRY Jul 1 '12 at 17:28
argh. i was re-reading my old question when i occured to me. the important part that i missed was "Note that each hexagon gets a different piece of the underlying texture up until the point the pattern repeats." ! by using a square texture duplicated several time, and mapping differently for even and odd hexagon, i should got a working solution. thanks – PATRY Oct 11 '12 at 8:55

cocos2d is an AMAZING library. They do hex tile maps. :D

share|improve this answer
cocos2d in in objective-C, doesn't it ? I'm working in java, for a PC version. If i someday finsih the game, perhaps i'll be doing a mobile version, but currently this is way out of my league. Thanks – PATRY Nov 16 '10 at 17:51
Ah, sorry. yeah, Cocos2d is an objective-C library. They also have a Python library for non-mobile deployment, I think. – Stephen Furlani Nov 16 '10 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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