Jump to content
  • Advertisement
Sign in to follow this  
KristofferDorph

Hexagons or just regular isometric map?

This topic is 2700 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys!

I'm currently working on a travian, ogame, browser based game. The genre is sci-fi, and every user has one or more cities on the world map.
My problem is this:
I would like to use hexagons, for the map tiles, for two reasons:
1. Not used very often
2. Maybe suits the sci-fi genre better than rhombus's

My problem with using hexagons comparet to rhombus's, is that I don't have an easy way to show the users where on the map they are located with coordinates. (could be fixed with throwing the coordinates away from the UI, and display a minimap in the corner of the real map)
I also want all the players to be able to see the position of theirs and other players cities by looking at the player's profile. But I don't really know how to do this without the use of coordinates? Maybe a very small map illustrating the rough position, or direction from the center of the map?

What do you think? or do you have any ideas to my huuugee problem? :-)

/Dorphern

Share this post


Link to post
Share on other sites
Advertisement
There are two fairly common ways of assigning x, y coordinates to hexes. Let's say that your hexes are oriented so that each hex has six bordering hexes: N, NE, SE, S, SW and NW.

Method one has every hex have the same relative coordinates for bordering hexes. For example, for a hex with the coordinate (x, y) the bordering N hex can be (x, y + 1) so S must be (x, y - 1). If we make the NE hex (x + 1, y + 1) then the SE hex must be (x + 1, y), the SW hex must be (x - 1, y - 1) and the NW hex must be (x - 1, y).

Method two has one rule for even hexes and another rule for odd hexes where even and odd refer to alternating columns or rows of hexes. For example, you can have a system that when x is even you use the above orientation scheme but when x is odd you use N (x, y + 1), S (x, y - 1), NE (x + 1, y), SE (x + 1, y - 1), SW (x - 1, y) and NW (x - 1, y + 1). This is somewhat more annoying to code, but fits standard human intuition of relative orientation of coordinates better. For example in the first scheme the hex two columns over direct east of (x, y) is (x + 2, y + 1), whereas in the second scheme it's (x + 2, y). If you've ever played the tabletop game Classic BattleTech, this is the kind of scheme they tend to use for their published maps (IIRC anyways).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!