Posts

Best Hexagonal Grids Algorithm

This guide will cover various ways to make hexagonal grids, the relationships between different approaches, and common formulas and algorithms. Hexagonal grids aren't as common as square grids. I've been collecting hex grid resources for over 20 years, and wrote this guide to the most elegant approaches that lead to the simplest code, largely based on the guides by Charles Fu and Clark Verbrugge.

The code samples on this page are written in pseudo-code; they're meant to be easy to read and understand. The implementation guide has code in C++, Javascript, C#, Python, Java, Typescript, and more.

Continue in Reference https://www.redblobgames.com/grids/hexagons/

Also for unity, A hexagonal grid implementation based on amit's https://catlikecoding.com/unity/tutorials/hex-map/part-15/

Where is Unity Log Files?

Image
Log Files There might be times during development when you need to obtain information from the logs of the standalone player you’ve built, the target device, or the Editor. Usually you need to see these files when you have experienced a problem, to find out exactly where the problem occurred.
On macOS, the player and Editor logs can be accessed uniformly through the standard Console.app utility.
On Windows, the Editor logs are placed in folders which are not shown in the Windows Explorer by default. See below.
Editor To view the Editor log, select Open Editor Log in Unity’s Console window.









On macOS, all the logs can be accessed uniformly through the standard Console.app utility.
On Windows, the Editor log file is stored in the local application data folder \Unity\Editor\Editor.log, where is defined by CSIDL_LOCAL_APPDATA.
Player
Note that on Windows and Linux standalones, the location of the log file can be changed (or logging suppressed). See documenttion on Command line arg…

How to Save and Load a Game in Unity

Image
Games are getting longer and longer, with some having over 100 hours of content. It would be impossible to expect players be able to complete all of what a game has to offer in just one sitting. That’s why letting the player save their game is one of the most essential features your game should have — even if it’s just to keep track of their high scores.
But how does one create a save file and what should be in it? Do you need to use a save file to keep track of player settings too? What about submitting saves to the web so they can be downloaded later on a different device?
In this tutorial you will learn:
What serialization and deserialization are.What PlayerPrefs is and how to use it to save player settings.How to create a save game file and save it to disk.How to load a save game file.What JSON is and how you would use it. It is assumed that you have some basic working knowledge of how Unity works (such as being able to create and open scripts), but other than that every…

Resolving harmless binding errors in WPF

While developing WPF applications, you will notice a lot of binding errors being displayed in output window; like this
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=CellsPanelHorizontalOffset; DataItem=null; target element is'Button' (Name=''); target property is'Width' (type 'Double') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is'ComboBoxItem' (Name=''); target property is'HorizontalContentAlignment' (type 'HorizontalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with referenc…

Unity Volumetric Light Error on Mac OSX

Image
When I get build from Unity for Mac OS X and run the game on Mac OSX, I get

ERROR:

Initialize engine version: 2017.3.0f3 (a9f86dcd79df)
GfxDevice: creating device client; threaded=1
2018-02-07 12:42:57.410 btm[28692:5744936] Color LCD preferred device: Intel HD Graphics 5000 (high power)
2018-02-07 12:42:57.410 btm[28692:5744936] Metal devices available: 1
2018-02-07 12:42:57.410 btm[28692:5744936] 0: Intel HD Graphics 5000 (high power)
2018-02-07 12:42:57.411 btm[28692:5744936] Forcing user selected device: Intel HD Graphics 5000 (high power)
Initializing Metal device caps: Intel HD Graphics 5000
Begin MonoManager ReloadAssembly
- Completed reload, in  0.137 seconds
WARNING: Shader Unsupported: 'Sandbox/VolumetricLight' - Pass '' has no vertex shader
ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Sandbox/VolumetricLight' - Setting to default shader.
WARNING: Shader Unsupported: 'Hidden/Bilater…

Top 5 Free Unity Assets

Image
The Unity Asset Store is a treasure chest of awesome tools for building games. Most of the offers are paid, but did you know that there are some powerful and very useful assets released for free? Such quality solutions are not only friendly to budget-sensitive indie developers but often beat the paid offers in terms of usability. On top of all, the free Unity Assets are a great way to get started with serious Unity game development.
Here is our list of the Top 5 Best Free Assets on the Unity Store!
1. iTween – Free Unity Scripting Library. iTween is a free and feature-rich animation system for Unity. It is one of the first assets I personally add to a new game project. It grants you access to dozens of useful functions which help you animate the exposed (i.e. public) values of any component!

Let’s say you want to move an object along a path. One way to do that is to create waypoints (empty gameObjects) and then use iTween to move your object from one waypoint to the next.…

Unity Development: MonoDevelop vs Visual Studio

If you’ve ever researched the Unity MonoDevelop vs Visual Studio controversy on the programming forums, you already know how passionate developers can be about their favorite tools. Devotional praise and heated vitriol are spilling over the keyboards 🙂 . And since a lot of the posted opinions are contradictory, a starting developer in Unity can become anxious about which code editor is the right choice.

Let me put your mind at ease: it doesn’t matter all that much which IDE (integrated development environment) you start with. Yes, yes – this notion seems strange when the overwhelming consensus online is that there must be a Highlander type of battle to the death.
However, selecting a code editor really doesn’t need to be a soul-crushing dilemma. You won’t fail as a game developer for not using Visual Studio any more than you would fail as a novelist if you shrug off Microsoft Word.
Indeed, MonoDevelop and Visual Studio have their Pros and Cons. However, there is one import…