tag:blogger.com,1999:blog-5052387.post4079033589265731525..comments2020-07-01T20:29:05.808-07:00Comments on Blobs in Games: Hex grids: choosing data structures and generating algorithmsAmithttp://www.blogger.com/profile/12159325271882018300noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5052387.post-44533507705295886542015-03-28T09:30:35.998-07:002015-03-28T09:30:35.998-07:00Anonymous: yes! I am adding support for this. The ...Anonymous: yes! I am adding support for this. The idea is that you can convert hexes into a regular cartesian coordinate system, then you can squish, rotate, and skew that system to make it into whatever you want. I have partially <a href="http://www.redblobgames.com/articles/coordinate-transforms/" rel="nofollow">written an article on that topic</a> but I have much more to write for that.<br />Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-67332588589592456702015-03-28T09:25:49.857-07:002015-03-28T09:25:49.857-07:00Herman: the fractional hex points might also be in...Herman: the fractional hex points might also be interesting in games where the player can move anywhere, not only on the grid. You can do this in screen coordinates of course but it's nice to be able to stay in game coordinates for the game logic.<br /><br />I don't know if this works for other types of grids. It works for hex grids because they're a plane embedded in 3-space, but it may not generalize.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-47329076337828330032015-03-27T10:34:39.751-07:002015-03-27T10:34:39.751-07:00How about adding info about squished hexes? Hexes...How about adding info about squished hexes? Hexes that would be seen from an angle instead of straight down.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5052387.post-30326287844785032212015-03-27T06:47:23.064-07:002015-03-27T06:47:23.064-07:00Again, very interesting. The idea of using fractio...Again, very interesting. The idea of using fractional hex points is something i did not think of. All our points are integers, but for some cases floats are useful. As you point out, for line drawing (we actually use "identity screen transform" and do the calculations in this dummy screen space for this), but also for grid geometry. Rotation around the vertex of a hex for example (as is necessary for certain match games), requires fractional points. In this case, we scale all the points by 3, do the rotation, and then scale them back down... but using true floats would be neater. Will give it a try!Anonymoushttps://www.blogger.com/profile/12584125270632119932noreply@blogger.com