Give our Grids library a try
Hi everyone,
Over the last few months we (me and my partner Jonathan Bailey) have been working on a grids library that we plan to sell in the Unity Asset store. The library makes it easier to work with various types of grids; especially hexagonal and triangular grids. To give you an idea of how it works, here is some Unity code for instantiating cells in a hexagonal grid formation:
Some other features:
We are doing some beta testing at the moment, so I was wondering if any of you want to give it a try. I would say the library is especially useful for prototyping projects, because it allows quick experimentation. The examples games are all less than 200 lines of code. With the grid-math out of the way, it's easy to get down to the game mechanics immediately.
Just send me a PM, and we can arrange it.
Over the last few months we (me and my partner Jonathan Bailey) have been working on a grids library that we plan to sell in the Unity Asset store. The library makes it easier to work with various types of grids; especially hexagonal and triangular grids. To give you an idea of how it works, here is some Unity code for instantiating cells in a hexagonal grid formation:
public void Start() { //Contructs a grid in a rectangular shape var grid = PointyHexGrid<Cell>.FatRectangle(9,7); // Map the grid to the center of the screen, with given cell dimensions var map = new PointyHexMap(cellDimensions) .WithWindow(screenRect) .AlignMiddleCenter(); //Instantiate cells and place them at the tight positions foreach(var point in grid) { Cell cell = Instantiate(cellPrefab); cell.transform.SetXY(map[point]); grid[point] = cell; //and assign the cell to the correct grid spot. } }
Some other features:
- Supports rectangular, diamond, hexagonal, triangular and rhombille grids.
- Supports many grid shapes for each grid type.
- Works well with GUI and sprite plugins such as NGUI and EZGUI.
- Easy to use layout functions for centering grids or aligning them with edges.
- Some grid algorithms: shortest path, connected shapes, diffusion.
- Fully documented.
- Comes with unit tests.
- Comes with code generation templates for Visual Studio.
- Lots of examples, including some mini-games: hex versions of Lights-out, Lines, and Pipes.
We are doing some beta testing at the moment, so I was wondering if any of you want to give it a try. I would say the library is especially useful for prototyping projects, because it allows quick experimentation. The examples games are all less than 200 lines of code. With the grid-math out of the way, it's easy to get down to the game mechanics immediately.
Just send me a PM, and we can arrange it.
screen_39.png
940 x 380 - 115K
tri_edge.png
1252 x 626 - 397K
Thanked by 1raithza
Comments
(That is what happens when typing code without a compiler...)