PDA

View Full Version : Hex map designer



Carver413
06-10-2013, 08:25 PM
I am getting to the point with the explorer project that I would like to start designing some game idea's, I want to create a rpg that is very large in scope so to keep this project in pespective I going to go with a hex map design. more work will be needed to work this into a 3d design but over all I think this could work very well for what I have in mind. any thoughs or Ideas?
1211

Ñuño Martínez
09-10-2013, 08:08 AM
Hex tile maps are more complex than square tile maps. The main advantage is that distances from the center of a cell to any of its adjacent ones is always the same. The main disadvantage is that you can't use the four cardinal NSEW directions easily.

Some time ago I found this article about hexagonal grids (http://www.redblobgames.com/grids/hexagons/) that explains different ways to face the problem. It uses HTML5 to show the concepts "in run-time".

Carver413
10-10-2013, 12:35 AM
thanks for the info provided. I will be sure to look it over. I must say though that my interest is not to create a hex based game but as a way to create nice looking maps with out alot of work. the tiles will be small in scale so they will be less restrictive to work with but will always blend in a consistent way. in some areas they will be small while other areas they may be quite large, some tiles will have 3d objects bound to them like stones or trees groups of tiles can form settlements or taverns that can be droped anywere they fit. there is no limit to this design.

Carver413
12-10-2013, 06:22 PM
I found a photo that really shows what I would like to acheve in my design. of course I am no where close to this but I will get there in time. anyway notice the stone walls and how they are attached to the tiles below using this Idea we can work with smaller maps and a much simpler engine design
1216

User137
12-10-2013, 08:03 PM
Seeing this guide http://www.redblobgames.com/grids/hexagons/ i was using “odd-q” vertical layout in 1 demo some month ago
http://www.pascalgamedevelopment.com/showthread.php?19357-Smoothening-tile-edges
I found that i can make smoother maps by using triangles, as seen here:
http://tinypic.com/view.php?pic=35knxp3&s=5#.UlmqR9Kw0QY I got rid of all sharp edges caused by hexagons. To say it otherway, quads and triangles blend better than hexagons.

Carver413
12-10-2013, 08:31 PM
Seeing this guide http://www.redblobgames.com/grids/hexagons/ i was using “odd-q” vertical layout in 1 demo some month ago
http://www.pascalgamedevelopment.com/showthread.php?19357-Smoothening-tile-edges
I found that i can make smoother maps by using triangles, as seen here:
http://tinypic.com/view.php?pic=35knxp3&s=5#.UlmqR9Kw0QY I got rid of all sharp edges caused by hexagons. To say it otherway, quads and triangles blend better than hexagons.
thanks, but I don't really think that's what I had in mind.

User137
13-10-2013, 07:29 AM
...I must say though that my interest is not to create a hex based game but as a way to create nice looking maps with out alot of work...
I'm not sure if i understood this part earlier. The screenshot you showed in last message is very strictly tying game objects to hexagon grid. The stone walls are also showing clearly the drawback of hexagon technique - edgy straights. Map is always somehow tied to game logics. You can't just render the map in 1 big PNG and use it for whole game world, if that is the idea?

I think what hexagons fit best is kind of grid-based games such as Civilization 5
http://static.giantbomb.com/uploads/original/0/8321/1275076-screenshot_02.jpg
But what is seen in that image for world terrain, is extremely complex to do (it's kind of what i tried to achieve in thread i posted in previous message, i couldn't find a shader algorithm that would make 1 of 6 corners straighten like that shoreline at bottom left). The tile-blending graphics are some advanced shadering and modelling. But if one has to choose between square grid and hexagon grid in that kind of game, and if it's about game mechanics, hexagon feels more natural.

Carver413
13-10-2013, 02:40 PM
I realize that this design will not produce straight lines but I don't really see this as a problem. the objects we place on top of our hexmap do not need to be hex shape they only need to occupy hex space. instead of tring to break the design you need to look at how you can use it to your advantage. and as far as the edge of your map you should create a buffer zone so you can't ever scroll to the edge. I plan to use natural barriers like the stone walls or something like it. I dont plan on using a special shader for this rather display lists of some sort. I will use predfined entrance point to chain maps
together rather then one large map. here are some more examples I found that kind of follow what I have in mind.

http://alumnus.caltech.edu/~leif/FRP/maptiles.html
http://www.terraincraftsman.com/
http://www.majhost.com/gallery/g2/LegoWargaming/hexonsample1.jpg

laggyluk
13-10-2013, 08:44 PM
I think what he ment is that making map like that programaticaly from different pieces of terrain type that blend together nicely on edges is difficult. Unless you are planning to have map painted by hand and just dividing it to hex fields it's gonna be tough

SilverWarior
14-10-2013, 03:12 AM
Hex grids were never ment to look good but instead they simplify some game mechanics like pathfinding (distance betwen two neighbouring tiles is always the same), range checking, etc.
With hex grids you easily gets depth perception by simply rendering hex grid on 3D plane.

But as it was already pointed out hex grids have their drawbacks:
Without specialy designed autotiles like in Civilization 5 you will have problems of making any straight edges. There will always be thet hexagonial look. Even thou i have seen a game that used hex grids and looked quite well. But that game used a bunch of verry small hexagons so they were barely noticable.
The second and probably the bigest problem is that by using hex maps you can forget about any height representations as they wil look ugly. Check "Missionforce Cyberstorm" for example.

So as User137 I would also suggest to you to use triangles based map design itself or to be more specific same design that was used for Settlers. You can read a bit about this design here: http://widelands.svn.sourceforge.net/viewvc/widelands/trunk/doc/geometry/index.xhtml

phibermon
14-10-2013, 03:31 PM
Just throwing in my two pennies - You don't to have to have your map representation (hex) constrain the entities within it's spatial paradigm. There's no reason you can't combine two path finding techniques, use hex as the first quick step and refine as the path is traveled using a higher resolution /alternate representation.

Using common game themes eg. buildings can be placed free form onto the hex map and then bounds checked to determine which hexes are totally obscured / partially obscured. Steering algorithms combined with this step as well as an additional heuristic calculation for partially occupied hexes would decouple your entities from the hex paradigm (if you so wish).

Hexes will partition into triangles obviously, but there's nothing stopping you dividing those triangles again and using these smaller triangles to refine the path finding.

Long story short : You can and often should have multiple spatial representations that you keep in sync as different algorithmic techniques work best with different representations. IE a quad-tree, where you can also push a reference to the individual hex tiles into.

Carver413
18-10-2013, 06:51 PM
I dont think that most of you really grasp the design that I have in mind these maps will be nothing more then custom bitmaps you will be able to draw to them just like any other map,only they will use brushes rather then colors in the rendering process. in 2d these brushes are mostly textures created from scripts. in 3d they will be shapes with textures bound to them. 3d will support height mapping that will look something like what you would expect from a vortex engine. most path finding operations as well as ai will be done from the bitmap level. 3d will only serve to display changes and translate 3d mouse clicks to 2d map coordinates. combat will look something like spellforce to start and if i get that far I go from there. to begin with I will support 2 types of tiles quad and hex. animation will be done from bones and joints but no skinning. models will be broken down to head,torso,arms and legs, something like that. I have done some experimenting on this and it seems to work well enough will keeping the design simple and flexable. 3d shapes brought into the game from other sources like blender an such will be bound to tiles where they can easily be dropped onto a map. there is still much to consider, changes to be made, but for now this is my plan. I'm going to keep it rather small scale and go for quality vs quanity.
Edit: also I would like the movement to be free movement where the tile represent the destination but character moves smoothly to the destination

Carver413
24-11-2013, 09:29 PM
I finally have I crude model in which ot evaluate my idea and I think it has possiblity. sure its not oblivion but who here would be up to such a task. you eather spend all your time on some monster engine in which you never really make use of or you settle for some sprite based engine because its within your grasp. I am trying to go middle of the ground with my work in hopes that I'll actually be able to get some use of it. at this point the map is contained in a 24 bit map but I will probably go with something more custom to the engine. I want alot of the logic stored in the tiles or groups of them to make it more plug and play. place a dungon enterance on the map and you have just created a new dungon. maps should also be linkable also by tile trigger points as an easy way to expand the game as we go along. as can be seen in the test photos it is possible to do height mapping and it isn't really ugly as silverwarrior said it would be. sure it still need lots of work and a better shader model before I can create better tiles but for now I want to focus on getting a full working model and worry about the eye candy later. also there is no reason to just use hex tiles, this model will support many dillerent shapes by the time it is complete.
1222122312241225
the tiles appear rounded here even though they are flat. I did this by adjusting the normals to compansate for my lack of a good shader. not really a final look for me but better then just flat. once I have normal map support then I will add normal mapping to the tile rendering but I have no way to test this at present.

SilverWarior
24-11-2013, 09:48 PM
as can be seen in the test photos it is possible to do height mapping and it isn't really ugly as silverwarrior said it would be.

It doesn't look so ugly just becouse you have small elevation deferences between nearby tiles. But if you make this height difference larger you will see what I mean.
So why not use similar approach as it is done in Settlers 2 where youe map is made from vector-based triangels. You do know that hex tile is made from 6 triangles?
So in the end you could still alow placing of various map times (structures, etc.) on what would be center of Hex tiles.

WILL
25-11-2013, 06:06 PM
I like where this project is going. Your vision certainly looks impressive. I hope this comes to full fruition.

Carver413
26-11-2013, 02:11 AM
It doesn't look so ugly just becouse you have small elevation deferences between nearby tiles. But if you make this height difference larger you will see what I mean.
So why not use similar approach as it is done in Settlers 2 where youe map is made from vector-based triangels. You do know that hex tile is made from 6 triangles?
So in the end you could still alow placing of various map times (structures, etc.) on what would be center of Hex tiles.
Like it or don't this is going to be a tile based engine. I have come to see this as a design challenge and thats what makes it fun. I will be creating most of the assets my self so I need to be realistic about what I can do on my own. if there is one thing that the explorer can do well at this point it would be tiles. most of this is do to the work I was doing with the gui and procedural texturing. I just couldn't figure out how to bring this into a game but now it seems all to clear.

Carver413
26-11-2013, 02:27 AM
I like where this project is going. Your vision certainly looks impressive. I hope this comes to full fruition.
thanks for the vote of confidence. I actually have a game Idea in the works to go along with this so I hope to develope them together as I go along. It is quite large in scope but I want to set it up so I can release it a chapter at a time and make it easy enough for modders to add there own stuff.

Carver413
05-03-2014, 04:26 AM
still working on my little project, this was a little test to see if I could create a map procedurally
1244

Ñuño Martínez
16-03-2014, 05:27 PM
Looks nice. Keep up the work.

Carver413
16-03-2014, 06:53 PM
Looks nice. Keep up the work.
Thanks, I'm starting to find those links you gave me useful.

Ñuño Martínez
17-03-2014, 01:22 PM
With pleasure. Also I see you recommend the links too, in another thread. Cool.:D

Carver413
17-03-2014, 11:43 PM
yes I like that its interactive so you can see cause and effect.

Carver413
27-07-2014, 11:25 PM
Still making progress in my design, you can't see it very well but I did a little experiment with random tile rotation to breakup the tile patterns a bit. looks rather well. character animations and movement is up and running.
1310