State of the game
It has been over a month since I posted the introductory video and sent my application to Unity. I never received any confirmation, so I assume it got lost somewhere along the way…
It has been over a month since I posted the introductory video and sent my application to Unity. I never received any confirmation, so I assume it got lost somewhere along the way…
Take a look at this:
Well, I wanted to do this sooner or later anyway, so I made a custom editor for the rectangular grid. Before this I was using the default inspector panel:
It has been over a week since my last post, so I might as well explain what’s going on. As I finished rendering I had tightened up all loose ends that were left, I consider Grid Framework to be complete for rectangular grids. You can perform all the common calculations, debug things and visualize the grid properly, either using simple lines or even Vectrosity. This is just the first step though. Hex grids are very popular for games for various reasons, so it makes perfect sense to do them next, right? Well, here is where the problem starts.
I have finished the drawing part for hex grids. As I mentioned before, there are many ways to draw hex grids and I want to cover as many of them as possible. Let’s count all the possibilities that work now.
Here’s a quick status update:
Good news at last, I just finished the finding functions for vertices, both in grid space and in world space. Here is a screenshot where the yellow gizmo indicates the vertex closest to the grey sphere.
Good news at last, I just finished the finding functions for vertices, both in grid space and in world space. Here is a screenshot where the yellow gizmo indicates the vertex closest to the grey sphere.
The align feature has been giving me quite some headache lately. For small objects it’s easy, just fit them inside the nearest hex. It gets more interesting once your object spans over more than one hex. Here is a screenshot from the game “Age of Wonders” for PC (I upscaled the image manually, AoW has a very low resolution)
Another progress update: WorldToGrid and GridToWorld are now implemented. For those who don’t know, those two functions convert a point’s coordinates from world space to grid space, the coordinate system used to locate points relative to the grid’s properties, and back. For rectangular grids it’s a fairly simple idea, the grid can be represented as a standard Cartesian coordinate system. With hex grids that won’t do it, you simply cannot force a hex grid into a Cartesian coordinate system, you need to find something else. Fortunately there are several topologically identical possibilities with easier, more intuitive coordinate systems. For the first release I have decided to use the herringbone pattern: