Rectangular grid that goes positive and negative horizontal and vertical #71
Replies: 2 comments 3 replies
-
The rectangle({ start: { q: -2, r: -4 }, width: 9, height: 9 }) When rendering, you have to add an offset (because the |
Beta Was this translation helpful? Give feedback.
-
I think it's better to let the visual coordinates and the actual coordinates be the same. I've updated your code to show a way to achieve this: https://jsfiddle.net/Flauwekeul/extn5fh4/ |
Beta Was this translation helpful? Give feedback.
-
I have been thinking on making a react application to map out a universe for the game X4. They use a hex system to represent their universe. However they use 0,0 as the center of the universe in a rectangular grid and then they build around it.
https://i.imgur.com/M1pfTGy.png
so you can have fe:
[-1,1][0,1][1,1]
[-1,0][0,0][1,0]
[-1,-1][0,-1][1,-1]
Is there a way to use honeycomb to accomodate this behavior and create such a grid. I could as a workaround translate 0,0 to -1, 1 when I display the grid onscreen as a matter of just changing the presentation. But in the future I need to also add data behind the hexes to transform into an output json file. If I have to transform the coordinates each time it would get really cumbersome.
If you believe this to be a technical nightmare to do I'll understand perfectly
Kind regards,
Celludriel
Beta Was this translation helpful? Give feedback.
All reactions