Results 1 to 6 of 6
Thread: drawing a 3D hex-grid map
- 06-23-2011, 05:18 AM #1Member
- Join Date
- Jun 2011
- Tsukuba, Japan
- Rep Power
drawing a 3D hex-grid map
Do you know where I can find a trial java version of a 3-D hexagonal grid map? Meaning, I need a map which is basically a sphere consisting of hex-grids on which I can click and select and then change properties.
Its used in some games, so I figured someone might know something about it.
- 07-04-2011, 10:27 PM #2a sphere consisting of hex-gridsNo bug ever had to calculate its fitnessfunction.
- 07-13-2011, 02:25 AM #3
I tried to write something like that (in C++) and didn't get very far. The part I got hung up on was U,V mapping. But basically, you start with a dodecahedron and keep bisecting the edges, turning each triangle into four triangles, and pushing the new vertices out to the radius of the sphere. Then you texture each triangle with a texture that has lines from the center point to the middle of each edge. This creates the appearance of hexagons; game objects that are "in" hexagons are actually at vertices of the mesh. There will always be 12 tiles that are pentagons (the original vertices of the dodecahedron); the rest will be hexagons of similar, but not identical size.
The Wikipedia page on dodecahedrons has the coordinates for the original vertices.Get in the habit of using standard Java naming conventions!
- 07-13-2011, 12:34 PM #4
I was triggered by the sphere consisting of hex-grids, which is mathematically impossible. Just to be sure, did you see this thread:
Developing an Hex-board strategy game
Hardwired makes a (flat) hex-grid there.
Maybe you should explain more where your problem lies, because kjkrum and I are going in very different directions on your question.No bug ever had to calculate its fitnessfunction.
- 07-14-2011, 01:07 AM #5
This might be a dead thread, but I'll post this just because I'm interested: EarthBrowser: Global Grid: The Icosahedral Hexagonal Grid This page that it links to is also a good resource: Discrete Global GridsGet in the habit of using standard Java naming conventions!
- 07-14-2011, 01:54 AM #6
Hello Kjkrum. Very nice posts. I would almost withdraw my statement about mathematical impossibility
The last time I have been experimenting more with polyhedrons. I made force-based graphs and constructed all kinds of regular polyhedrons, including buckyballs (and much other things like balls in balls, mobiusrings and irregular stuff. At the moment I can't read them back: XML-persistence ).
Do check out Hardwired's (flat) code: it is nice (I have been busy expanding it a little, like MVC and coloring (almost)).
I checked out your project and blog. I like that too. Sorry it is not really my kind of programming (networking), but maybe I could help with some subproject.
(Sorry, out of topic.)No bug ever had to calculate its fitnessfunction.
- By rjsupaflea in forum New To JavaReplies: 14Last Post: 06-07-2011, 02:47 AM
- By iCon09 in forum New To JavaReplies: 2Last Post: 02-26-2011, 08:04 AM
- By CrystalMoth in forum Java 2DReplies: 11Last Post: 01-10-2010, 06:07 AM
- By racewithferrari in forum New To JavaReplies: 2Last Post: 11-03-2009, 06:27 PM
- By racewithferrari in forum New To JavaReplies: 1Last Post: 11-01-2009, 11:16 PM