• How to extend Grid Framework with your own methods

    Let's say you just bought Grid Framework, wrote some game logic and now you want to reuse it. Wouldn't it be great if it was a class method in Grid Framework so you could simply call it with one line of code? Even better, what if you could have one method that has the same syntax for both rectangular and hexagonal grids but different implementation based on the type of grid, so you would have to write just one script for any type of grid? Luckily this is no problem in Unity thanks to extension methods and if you have the code, then wrapping it up into an extension method can de done in a few minutes. Take a look at my latest video tutorial:

    Continue reading…

  • Hex Grid introduction video

    I made a short video giving you an overview of hex grids, so you can see them right in action. I'll make a video on how to extend Grid Framework with your own methods yourself next,

    Continue reading…

  • Grid Framework version 1.2.0 released

    The wait is over, version 1.2.0 is out, bringing you the long promised hex grids. I'll soon make a video demonstrating the new grid, in the meantime let me explain it in words. My implementation brings you all the features you knew from rectangular grids, except on a hex grid, and both grids inherit from the same base class. This means the API for both is the same and you can write one script for both grids with little to no need to make special adjustments for different grid classes. Currently there is only one coordinate system and hex grids have "only" as much functionality as rectangular grids. I wish to improve upon this in the future.

    Continue reading…

  • Grid Framework version 1.2.0 submitted

    Just a quick update, version 1.2.0 has been submitted. This is your last chance to buy the package for 15$, once it has been approved the price will be raised to 20$.

  • Grid Framework version 1.1.10 released

    The 1.1.10 update brings in a new function, ScaleVector3(Vector scl) : Vector3 which takes in a vector and then scales it so it fits inside the grid. This is similar to AlignVector3, which was introduced in the last update, to allow performing the aligning and scaling without having to provide an actual Transform.

    Continue reading…

  • How about herring for lunch?

    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:

    Continue reading…

  • Trying to fit a square peg into a hex hole

    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)

    Continue reading…

  • Hex Grids love Vectrosity

    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.

    Continue reading…

  • Vertex progress

    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.

    Continue reading…

  • Back again

    I just wanted to drop a line saying I'm back to work. As I mentioned previously I was busy with exams, so development was slowed down and during the last couple of weeks I had to stop completely to concentrate on studies. Now that it's over I can get back to working on the hex grid update. Currently I'm about halfway done, maybe more. I'll keep you updated :) Finally, I'd like to thank everyone who bought Grid Framework so far, you guys have made all this effort worthwhile and you are the ones who allow me to go on with it. Thank you.

  • Example video: Level Design and Text parsing in Unity3D

    I made another example video for Grid Framework, this time for the recently introduced text parsing example. Now building new levels is as easy as writing a few lines of plain text and you get perfect clockwork-like precision. This opens up new possibilities for faster development, easier maintenance, easier level editors and support for user-made content. Just take a look at how simple, yet effective it is:

    Continue reading…

  • Version 1.1.7 released

    Version 1.1.7 has been approved by the Asset Store team. I fixed a small typo that prevented the menu item for adding the GFGridRenderCamera component from working and I added two more examples, video tutorials will follow soon. I also redid the screenshots because the Asset Store ate my old ones somehow.

    Continue reading…

  • Cannot log into my account

    I've written two new examples, one that takes a plain text file and parses it to create a breakout-style level based on a grid without changing the scene, the other is a continuation of my grid-based movement example where I can place obstacles on the grid and the sphere will not step on those squares (without using any physics like collision and raycasts). Sadly I can't update Grid Framework because I can't log into my account via Package Manager. My account still works, I can log into the forums and my Publisher Administration, so the problem must lie within the editor. I've submitted a bug report, but until then I cannot publish updates. If you are interested in one of those two examples please contact me over the Unity forums and I'll send you the examples, provided that you already own Grid Framework. On a related note, it appears that Grid Framework's product page in the Asset Store doesn't have any screenshots. I did submit screenshots, but they don't appear for me, I don't know if other people can't see them either.

  • 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.

  • 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.

  • Hex grid drawing - finally!

    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.

    Continue reading…

  • Swap variables in Unity

    I've decided to go with one HexGrid class and provide enough options. To do this I will need to swap around variables so I can use the same formulae for different cases. I could write the swapping part where it is needed, but then I'd be writing the same thing several times (which is a bad thing to do). Wouldn't it be better if there was some sort of swapping function? Could that function work for any type of variable? Could it work without needing to reassign variables again? Yes to all of that:

    Continue reading…

  • The current roadblock

    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.

    Continue reading…

  • Version 1.1.3 released

    You know, sometimes I look at something and wonder "what kind of idiot designed this!?", only this time I was the idiot. Let's say you wanted to render a simple 3x3 grid and you wanted the origin to be in the lower left corner. Well, you simply couldn't do that, not until now:

    Continue reading…

  • Version 1.1.2 released

    It's up, version 1.1.2 brings Vectrosity support, better documentation and integrates Grid Framework into the menu bar. From now on you will never again have to drag scripts manually from the Plugins folder onto objects when using Grid Framework.

    Continue reading…

  • Vectrosity progress

    Well, it's pretty much done, you can now get a set of Vector3 points for use with Vectrosity from just one line of code. I played a bit with Vectrosity to make an example scene and this is what it looks like:

    Continue reading…

  • Line width for rendering

    I just submitted version 1.1.1 (update: has been approved) which lets you set the width of the rendered line in the inspector. Here is an example, obviously it's over the top, but you can set the width to anything you like.

    Continue reading…

  • A new inspector

    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:

    Continue reading…

  • Version 1.0.1

    If you tried debugging the functions FindNearestFace() or FindNearestBox() you might have noticed that the cubes drawn didn't have the same rotation as the grid. While it didn't change anything about the returned value (only the centre of the cube mattered), it looked ugly. I've submitted a small update that fixes the rotation:

    Continue reading…

  • Grid-based game logic

    Another video tutorial, showing how to use grid-based game logic in a puzzle game. This is the tutorial for the lights-out game I mentioned before and which has been included with the package.

    Continue reading…

  • Release!

    Grid Framework has been approved and is from now available on the Unity Asset Store for 15$

    Continue reading…

  • Grid movement and runtime snapping

    Well, I just sent my second submission. There are three examples included, one showcasing grid-based movement, one showcasing how to place objects on a grid during gameplay and the lights-out game mentioned below. I also made tutorial videos for the first two, showcasing how you can accomplish these tasks in a simple manner on your own:

    Continue reading…

  • A quick update

    I have been contacted by an Asset Store admin, who recommends me to include a demo scene so users could see an end setup. I thought dragging a script onto an object is pretty straight-forward, but I agree, a demo scene would be a really good idea. The tricky party is coming up with good ideas; don't get me wrong, I have plenty of ideas for actual gameplay examples, but for a demo scene I need something more basic and at the same time more catchy. I already made a little sphere that randomly roams a grid face by face, stays within limits and immediately adapts to changes in the grid, all with just 32 lines of code total (not counting whitespaces and comments). I'll come up with two or three more nice demos, that should give a good impression of Grid Framework in action.

  • Almost there...

    Well, it's almost done. Again. Turns out that making an asset is only half the job, you still need to hammer out any ugly dents, polish the thing and then change your job to become a graphic designer, a video commentator, a writer and a salesman! What good is the best asset if you present it in such a way that makes people not even want to take a look? I'm not claiming that I'm an expert in any of those fields, but I believe I did a pretty good job (well, maybe my voice work for the video could use some improvements). In a way I'm glad the old "images" I had prepared for the first version are now lost forever, that was something to turn people away forever. You cannot imagine how awful those looked.

    Continue reading…

  • Turn off the lights!

    Here is a nice little puzzle game made using the grid framework. When you click a square that square and the four adjacent squares flip their color. Your task is to turn them all off.

    Continue reading…

  • 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...

    Continue reading…