Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Turn Based: Square Grid vs. Hexagonal Grid

mondblut

Arcane
Joined
Aug 10, 2005
Messages
22,240
Location
Ingrija
"across vertices" means teleporting over a whole row of hexes, and in terms of lenght, is only marginally different from walking twice to the same location.

"over the corners", on the other hand, is a logical thing to have, and saves about 1.5 time of walking twice.
 

zenbitz

Scholar
Joined
Feb 2, 2009
Messages
295
OgreOgre said:
zenbitz said:
If you can have 8 orientations on a square, you can have 12 on a hex grid
12? How is that possible?

Across the 6 edges and 6 vertices, I guess. Similar to how you can go over the corners of the squares to get 4+4=8.[/quote]

Correct, although I think I see the confusion. You can only MOVE to 6 other spaces (without jumps...), but if you think of a character as an arrow it can be pointed at a hex facing (giving moves of "forward", "back", "sideslip forward left", "sideslip forward right","sideslip rear left","sideslip rear right") or at a vertex, which would give 6 moves of "forward right", "forward left", "right", "left", "rear right", "rear left".

It makes it complicated when determining which surrounding hexes are flank vs. rear but also true of a square grid.

In the end, if you make the grid much smaller than the occupants, it doesn't make a bit of difference to the computer.
 

MisterStone

Arcane
Joined
Apr 1, 2006
Messages
9,422
What if a game used a grid, but was designed so that a human-sized character actually occupied 4x4, 5x5 or whatever grid squares. Then, for instance, moving in a cardinal direction for one "movement point" would move it three squares in that direction, but going diagonal would only move 2 squares. Moving in a cardinal direction for one MP would move you 3 grid units, diagonally it would come out to 2.85 grid units (2 X sqrt2). It's still a crude approximation, but that missing .15 grid square worth of distance wouldn't be too big of a deal a small battle map, right? And dividing the grid into smaller units of area (relative to the size of a human) would allow you to divide up distance like this while allowing the gamer more precision in how far they move. Would this be a good compromise between hex and grid?

Obviously someone somewhere has thought of this before in designing strategy games, and I am sure this would entail problems I have not thought of yet...
 

J1M

Arcane
Joined
May 14, 2008
Messages
14,628
The main problem with that system is that it would be more work to play on a table top and most of the systems you see in computer games are derived from or prototyped on paper.

Technically D&D already does that, except human characters are the size of one square and a troll or whatever is 2x2. I think the main advantage to making the squares smaller than the characters is that you can have additional weapon ranges. ie. a dagger could have a reach of one square and a longsword a reach of 2 while a spear may have a reach of 5.
 

MisterStone

Arcane
Joined
Apr 1, 2006
Messages
9,422
Yes, that is another advantage I thought of. I guess it could be tedious, or at least involve people re-designing maps and figures, but it seems like it would be versatile. If not on tabletob, at least it ought to work well in a computer game. But then again, computer games can do away with grids entirely if it is absolutely necessary.
 

J1M

Arcane
Joined
May 14, 2008
Messages
14,628
karnot said:
Doesnt hexagon have 4 polygons, not 6 ?
I can see this adds a great deal to the discussion. Thank you.
 

karnot

Educated
Joined
May 29, 2008
Messages
64
I can see this adds a great deal to the discussion. Thank you.
For someone like yourself, who didnt actually read the thread - here, from post â„–3 :

for a hexagon you have to calculate if the mouse was inside 6 polygons inside of a certain hex.
Why would you check extra two polygon ?

A hexagon has as many polygons as a square: one.
Fail.
 
Joined
Apr 2, 2009
Messages
517
Location
The frozen north
Checking if a mousepointer is inside a hexagon or a square is only done OnMouseMove and will not affect performance much since it's a user initiated task. Pathfinding in hex or square is both simple so that should not be much difference.

Personally I would go with hexes if it wasn't wierder/harder to do art for hexes than squares.
 

J1M

Arcane
Joined
May 14, 2008
Messages
14,628
karnot said:
I can see this adds a great deal to the discussion. Thank you.
For someone like yourself, who didnt actually read the thread - here, from post â„–3 :

for a hexagon you have to calculate if the mouse was inside 6 polygons inside of a certain hex.
Why would you check extra two polygon ?

A hexagon has as many polygons as a square: one.
Fail.
What are you trying to say here? That post #3 has a good method of checking which grid location is selected? lol

He's using an O(n^2) solution for an O(1) problem.

Then he starts talking like his solution is somehow related to polygons... which it is not.

What most interests me though is why you thought you had any grasp of this subject at all, when clearly you don't.

EDIT: Let's get this back on track. Is there any use for a grid based on triangles that offers an advantage over quads or hexes?
 

deuxhero

Arcane
Joined
Jul 30, 2007
Messages
11,401
Location
Flowery Land
porchsitter said:
What's wrong with free movement?
When the PC is selected draw a bunch of concentric circles on the ground and move to any point on a particular circle for x AP.
I believe most game engines provide functionality to dectect the world location of an object you clicked, and if your terrain has constant elevation it wouldn't be too hard to do the math yourself

Didn't ToEE do something like that?
 

ShavenApe

Novice
Joined
Jul 21, 2009
Messages
55
karnot said:
A hexagon has as many polygons as a square: one.
Fail.

hexâ‹…aâ‹…gon
Pronunciation [hek-suh-gon, -guhn]
–noun
a polygon having six angles and six sides.

blank_facepalm_224.gif
 

Khor1255

Arcane
Joined
Sep 8, 2008
Messages
58,848
Size of the 'grid' is really the only important issue gameplaywise. A hex or a square (or triangle for that matter) all work pretty well except that squares can line up precisely with north south or east west coords and other shapes cannot. A very minor mapping advantage that.

But the size of the grid (especially in a computer game) is very important. The smaller it is the more detailed your basic combat system can be. Smaller grids means easily calculable range advantages even with weapons like swords and knives.
One of the hardest things to pull off is to give nuances to different weapons where the basic grid system is on too large a scale. At one point most weapons become almost exactly alike inb terms of range and draw cost unless you have a more detailed grid system.
 

Tardvapor

Novice
Joined
Jan 15, 2009
Messages
43
I think squares work better in a system where multiple movement points are required to move a single space (1.5x then for a diagonal) like X-Com and JA2, and hexes work better when 1 movement point equals one space.

And we all get +20 nerd points for reading and posting in a thread arguing which is better squares or hexagons.
 

Khor1255

Arcane
Joined
Sep 8, 2008
Messages
58,848
Why do you say that? You know, squares vs. hexes and movement points?
 

Tardvapor

Novice
Joined
Jan 15, 2009
Messages
43
erm.... it was an attempt to respond to the opening post I guess....

Why are you Dan Watson?
 

Khor1255

Arcane
Joined
Sep 8, 2008
Messages
58,848
I don't get it. You aren't even trying to explain yourself. Nevermind.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom