2012/09/22

Version 1.1.6 submitted

Important Note: The classes Grid and RectGrid have been renamed to GFGrid and GFRectGrid, you will need to change your source code accordingly.

You might be wondering why I would do such a thing more than one month after releasing the package. Using regular English words is simple and intuitive; however, the danger of name collision with another class called the same is quite large. Let's say a user has already a class called Grid for something in his or her project. When they buy Grid Frmework all of the sudden they will get compilation errors because now there are two classes called Grid. It would be unreasonable to expect users to change their class, especially if that class is already part of a more complex chain of dependencies or inheritance. They could change my code, but then they would have to change it after each single update of Grid Framework. If the class Grid is already defined in some other third party extension it gets even worse.

Adding the GF in front of both classes reduces the chance of name collision. I apologize to all my existing customers for having to change their source code because I didn't think about this in time, but I had to resolve this before it becomes an issue and the sooner I get it sorted out the less customers will have to change their source code. I am very sorry, but this should fix the problem once and for all.


Aside from that the GFRectGrid class contains some minor code cleanup and performance boosts, so it's not all bad news.

2012/09/06

Version 1.1.5 released

As per request the custom rendering range now affects drawing as well, not just rendering. If you are wondering why this wasn't the case before, it was a leftover from before the custom rendering range got implemented. Originally the custom range was only meant for rendering because that would be what the layer sees in the final game, not the drawing, whether they are the same or not. Also, the drawing is only a drawing, the grid keeps working beyond what's visible, being infinite. That's why the drawing had low priority and I worked on other parts instead.

2012/09/05

Version 1.1.4 released

Version 1.1.4 has been approved. It doesn't add anything new for a change, instead it fixes a bug where lines with a width larger than 1 were drawn on top of things they were supposed to be under.

2012/09/02

Hex grid progress so far

Here's a quick status update:

  • Drawing: This works perfectly now, the hexes are drawn properly as described in the post before, and now i have added lines that connect the different layers of the grid.
  • Rendering: Like drawing alsmost finished, except one minor issue. In the rectangular grids you can specify a width for the rendered line and, since the line is drawn in 2D, I had to calculate the directions in which to expand the lines. There were only three possible directions and the lines were sorted by X, Y and Z, so it was enough to calculate each of the three directions only once. With hex grids one set of lines is zig-zagged, so I need to calculate four directions total. I need to find a nice way to separate the the two differently slanted lines. I don't want to calculate the direction for every line as that would be a waste of ressources.
  • Find nearest face & Get face coordinates: done, although only for the default coordinate system.
  • Find nearest box & Get box coordinates: done, just like above


This leaves the following functions:

  • Find nearest vertex & Get vertex coordinates: The challenge here lies in finding a nice coordinate system, and by nice I mean one that's intuitive to understand, easy to implement and easy to maintain
  • Build vertex matrix & read vertex matrix: Getting the vertices is already done, the challenge again lies in finding a good coordinate system.
  • Align & Scale transform: shouldn't pose any problems
  • World to Grid & Grid to World: you guessed it, deciding on a coodinate system
  • Get Vectrosity Points: This will take the same points as used by rendering and drawing, but the array has to be processed first to fit Vectrosity's requirements


So, all in all it looks pretty good. Unfortunately progress has been dragged down by my studies, I'm writing exams soon, so I can't afford to work on Grid Framework full time. The plan is to finish all the needed functionalityl for the first release. After that additional coordinate systems will be added and after that I'll add more drawing shapes like triangular and circular hex grids. That will conclude the hex grid chapter of Grid Framework.